AWS CDK CloudFront Origins: Add an origin to an existing distribution #24275
reply2srij
started this conversation in
General
Replies: 1 comment 1 reply
-
Hi, Is your cloudfront distribution created with CDK? If yes, you should be able to define multiple behaviors and origins in a distribution in CDK. check this out: https://github.com/aws/aws-cdk/tree/main/packages/%40aws-cdk/aws-cloudfront#multiple-behaviors--origins I am moving this to discussion as this seems to be a general guidance request. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Describe the feature
Need to be able to add a new Origin/behavior to an existing CloudFront distribution.
Use Case
My project has a use case where our distribution has multiple origins. We developed several *Stack.java classes which will create our infrastructure.
Now let's say in Stack1.java class, we have created a CloudFront Distribution with a couple of origins. In a future release, we need to be able to add a new origin to this existing CloudFront distribution. We would like to do this in a different class - Stack2.java. Both Stack1.java and Stack2.java will be in the same project under the same package structure. But, I do not see a way to retrieve an existing distribution and add a new origin to it. Please let me know if its possible to do this or can this be a feature request?
Proposed Solution
No response
Other Information
No response
Acknowledgements
CDK version used
2.18
Environment details (OS name and version, etc.)
Java 11, AWS CDK
Beta Was this translation helpful? Give feedback.
All reactions