繁体   English   中英

创建 S3 存储桶时触发 Lambda function

[英]Trigger Lambda function when S3 buckets get created

I want to create a Lambda function using Java or Python so that whenever a new S3 bucket gets created, by default it enables default encryption of AES256 and server-access logs on those buckets, if they were not enabled while creating the bucket.

您可以在此处使用 Cloudwatch 事件。

  1. Go 到 cloudwatch 和事件,select 规则。
  2. 创建新规则。
  3. Select Event Pattern,具体操作,然后是select CreateBucket。
  4. 现在在下一列中,您可以单击添加目标和 select 您要触发的 lambda。 (如果您还没有,请创建一个)

现在使用 Java 编写您的 lambda 并使用 SDK 进行所需的任何更改。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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