Reputation: 506
I'm facing a quite odd problem. I want to clone my Cloudfront distribution, so that the cloned versions would listen to changes on the original. The problem I'm facing is that my original distribution has some Lambda functions in it's default Behavior. When I deploy changes to the original distribution, usually a new version of the lambda functions, I want it to change across all the cloned distributions. Otherwise the cloned distributions will keep using the old versions of those functions.
I'm wondering if someone else faced this problem, and if there is an automated way around this? I'm talking about hundreds of distributions.
I know how to clone a Cloudfront distribution, but couldn't find anything about adding those listeners.
Upvotes: 0
Views: 189
Reputation: 3365
You can use AWS Config and CloudWatch events to get notifications when the primary cloudfront distribution is changed (here is a link). This requires some trial and error, but the process:
On the other hand, I'd definitely go on the route of using IaaC tools, such as CloudFormation or Terraform. You can change the config in one place and they can take care of the rest.
Upvotes: 1