Home > Software design >  How to update CloudFront events to trigger lambda using boto3
How to update CloudFront events to trigger lambda using boto3

Time:06-10

Our goal is to allow switching between maintenance mode or main website that hosted in s3 and served through CloudFront.

We have tried using lambda@edge to return html and trigger it via CloudFront events viewer request

It's works fine, but now instead of updating CloudFront distribution via console, we want to update it using CLI (boto3). I have read boto3 documentation and can't find how to implement it. Is it possible to update CloudFront events via boto3, or is there another solution?

CodePudding user response:

Yes, you use update_distribution which allows you to specify LambdaFunctionAssociations.

  • Related