question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CloudFront Origin IDs

See original GitHub issue

Hey there, Currently we’re migrating a serverless project to use the CDK. What we’re experiencing now is that despite setting an ID for an Origin behavior it is always overwritten by origin{indexOfBehavior+1}. I also found that there is no typesafe way in TypeScript to set this property on Behavior, because it doesn’t exist on that type. The parent construct CloudFrontWebDistribution is internally using an unexported type for behaviors called BehaviorWithOrigin. The constructor of CloudFrontWebDistribution is overwriting any specified (by sidestepping the typechecker) origin id, see here.

My question now is: is that the expected behavior of the CDK? Like, is this intentional to prevent people to have colliding origin IDs? Or is this a bug/feature?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:23
  • Comments:18 (4 by maintainers)

github_iconTop GitHub Comments

14reactions
dpistolecommented, Jun 8, 2020

doesn’t need to reopen but I was lead here by google because I wanted to give my origins friendlier names to help make identifying them easier while troubleshooting, not the most critical use case but a would be nice for me anyway

6reactions
antonfelichcommented, Feb 10, 2021

Just came across the same limitation. Agree it’s a pretty low priority, however, having human-readable names that match the purpose of the origins definitely makes debugging easier.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Origin - Amazon CloudFront
An origin is the location where content is stored, and from which CloudFront gets content to serve to viewers. To specify an origin:...
Read more >
CloudFront Origin Access Identities - Flexera CMP Docs
An Origin Access Identity (OAI) is used for sharing private content via CloudFront. The OAI is a virtual user identity that will be...
Read more >
Cloudfront Origin Access Identity (OAI): How to use it? - StormIT
Amazon CloudFront OAI is a simple function of CloudFront distribution that you can enable when you select S3 buckets as origin. If you...
Read more >
CloudFront distribution origin should be set to S3 or origin ...
Get the ID of the CloudFront CDN distribution you want to remediate, either via the console or CLI: · Save the distribution configuration...
Read more >
aws::cloudfront — Gyro 1.2.0 documentation
List of origins for this distribution. ... A unique ID for this origin. ... The DNS name of the origin. ... Optional path...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found