How can I add an existing s3 bucket as a lambda trigger using AWS Cloudformation template? Is it even possible to do so using only CloudFormation template?
0
I want to add a existing S3 bucket as a trigger for a lambda function that i am creating in the stack. I do not want to use management console to import the s3 bucket resource as i have to repeat this process multiple times with different s3 buckets.
Here is a sample of code that i am using for adding a s3 trigger for lambda whenever a txt file is uploaded in the bucket :
The above code creates the s3 bucket and then adds the trigger. I require to do the same without creating the s3 bucket.
Basically i want to remove the creation of this part: