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":
But when I add a s3 trigger - nothing happens when I upload a file to the S3 bucket!
This is the function overview:
And this is the relevant policy in the "simple role" role, which should grant access to S3:
Here is the relevant bucket, when I upload file to it nothing happens in the Lambda!
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.