Doc looks very clear Serverless Framework - AWS Lambda Events - S3
However, it’s not working for me and I suspect it has to do with the way I’m doing.
Basically, whenever a folder starting with final-....
(which contains two files) is uploaded to a folder in a bucket, I want to trigger the lambda (which I know is working).
Here’s my basic config:
functions:
heyex-pipe:
timeout: ${self:custom.timeout}
image:
name: heyex-pipe-docker
environment:
BUCKET: ${self:custom.s3bucket.${sls:stage}.name}
events:
- s3:
bucket: ${self:custom.s3bucket.${sls:stage}.name}
event: "s3:ObjectCreated:*"
existing: true
forcedeploy: true
rules:
- prefix: AISolutionFolder/final-
So, if I do:
aws s3 sync tests/final-example-id-folder-dcms s3://my-test/AISolutionFolder/final-example-id-folder-dcms
this is not triggering the lambda.
Any idea what I could do further?