如何使用boto3更新云方事件以触发lambda
我们的目标是允许在S3中托管并通过CloudFront服务的维护模式或主要网站之间进行切换。
我们已经尝试使用lambda@edge返回HTML并通过CloudFront Events viever request
触发它
,但现在可以通过控制台更新CloudFront Distribution, 我们要更新它使用CLI(BOTO3) 。我已经阅读了BOTO3文档,找不到如何实施它。是否可以通过BOTO3更新CloudFront事件,还是有其他解决方案?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,您使用允许您指定
lambdafunctionAssociations
。Yes, you use update_distribution which allows you to specify
LambdaFunctionAssociations
.