Home > Blockchain >  aws lambda with S3 trigger is not firing
aws lambda with S3 trigger is not firing

Time:09-19

I have a lambda function, which I deployed with a container image. The function itself is super simple, and it basically prints something stupid. When I'm testing it using the "test" tab in the console I get "Execution succeeded": enter image description here

But when I add a s3 trigger - nothing happens when I upload a file to the S3 bucket!

This is the function overview:

enter image description here

This is the Execution role: enter image description here

And this is the relevant policy in the "simple role" role, which should grant access to S3:

enter image description here

Here is the relevant bucket, when I upload file to it nothing happens in the Lambda!

enter image description here

Any help will be appreciated!

CodePudding user response:

It is likely that the function did execute, but you cannot see its output.

The IAM policy associated with the AWS Lambda function should have, at minimum, the AWSLambdaBasicExecutionRole, which grants permission to upload logs to CloudWatch. This way, you can debug the function.

Without those permissions, the only indication that the function executed would be the 'Invocations' graph in the Monitoring section of the function.

  • Related