简体   繁体   中英

How to update CloudFront events to trigger lambda using boto3

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?

是的,您使用update_distribution允许您指定LambdaFunctionAssociations

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM