I have a lambda that gets input from an S3 bucket. I’ve created the bucket and an attached bucket policy in my Resources section, however whenever I deploy it deletes the existing contents of my bucket. Is this intentional? Does anyone know if there is a work-around for this?
S3BucketMyBucket:
Type: AWS::S3::Bucket
Properties:
BucketName: my-bucket
devMyBucketPolicy:
Type: AWS::S3::BucketPolicy
Properties:
Bucket: my-bucket
PolicyDocument:
Version: "2012-10-17"
Statement:
-
Effect: Allow
Principal:
Service:
- ses.amazonaws.com
Action: s3:PutObject
Resource:
- arn:aws:s3:::my-bucket/*
Condition:
StringEquals:
aws:Referer:
- 1111111111111