S3 Bucket event and lifecycle

Hey folks,

I am trying to setup an aws s3 bucket with an event lambda and lifecycle rules. I have not found an example of this and am not able to get a simple example toghether that works for me.

Can you please assist.

The following link is a public gist with my current failing setup.

In your serverless.yml you’re setting the LifecycleConfiguration property inside your Lambda permission resource (i.e. Type: "AWS::Lambda::Permission"), which has nothing to do with permissions.

The LifecycleConfiguration property belongs in your CFN bucket definition. See the comment on line 19 of your gist.

Thank you for your help. That totally worked.