CloudFront Origin IDs
See original GitHub issueHey 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:
- Created 4 years ago
- Reactions:23
- Comments:18 (4 by maintainers)
Top GitHub Comments
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
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.