- Mais recentes
- Mais votos
- Mais comentários
Hi, you can see in https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-distributionconfig.html that origins are managed under the Distribution resource, not separately. So you can update your Stack that managed the Distribution to add another Origin, but you can't manage a new Origin in a separate Stack (I think this is what you're asking?) as it's not an independent resource.
It's like this because the underlying API https://docs.aws.amazon.com/cloudfront/latest/APIReference/Welcome.html is like this - no separate Origin API actions are available. So even doing this via a custom resource isn't really viable.
In CloudFront, you can definitely add more origins after the initial setup.
- Head over to the CloudFront console.
- Click on the Distribution Id you're updating.
- Hit the 'Origins tab.
- Click 'Create Origin' and fill in the needed details.
- Hit 'Create' and you're done.
Remember to tweak your cache behaviors to send requests to the new origin. And keep in mind, changes can take some time to propagate.
Conteúdo relevante
- AWS OFICIALAtualizada há 2 anos
- AWS OFICIALAtualizada há 8 meses
- AWS OFICIALAtualizada há 2 anos
ah, after rereading your question I see that you are leveraging CloudFormation, my answer did not take that into account. I am not sure, how that complicated things, I can try to research it. Apologies.