triggers not creating
justinTM opened this issue · 3 comments
justinTM commented
- add an s3 trigger
module "lambda" { ... allowed_triggers = { // keys are user-defined and not specific options // service is prepended to ".amazonaws.com" internally AllowExecutionFromS3 = { service = "s3" source_arn = data.aws_s3_bucket.this.arn } } }
- no trigger when viewing lambda in AWS Console after terraform Apply
rkostyantyn commented
Correct me if I'm wrong, but the "allowed_triggers" parameter is for triggers that have already been created separately, and only creates policies.
To create an s3-event trigger, you need the "aws_s3_bucket_notification" resource, which is not part of this module (I'm looking for that too)
antonbabenko commented
Here is the module for notifications - https://github.com/terraform-aws-modules/terraform-aws-s3-bucket/tree/master/modules/notification , and here is the example -
https://github.com/terraform-aws-modules/terraform-aws-s3-bucket/tree/master/examples/notification
@rkostyantyn is correct. The Lambda module only creates policies to allow external triggers.