Create a Lambda notification in an S3 bucket with CloudFormation

后端 未结 2 1847
日久生厌
日久生厌 2020-12-23 15:08

I\'m trying to create an S3 trigger for a Lambda function in a CloudFormation Template. The S3 bucket already exists, and the Lambda function is being created.

This

2条回答
  •  误落风尘
    2020-12-23 15:53

    I use another solution because personally I don't like custom resource. I create a cloud trail to capture S3 write events for the concerned bucket, then I create a cloudwatch/eventbridge rule with S3 event pattern to trigger my Lambda function. This way I can hook my Lambda function to an existing S3 bucket without touching it, and it can be easily done through cloudformation.

提交回复
热议问题