sls-base
sls-base copied to clipboard
AuctionsBucketPolicy - API: s3:PutBucketPolicy Access Denied
I am getting the following error when creating a new bucket with cloud formation:
AuctionsBucketPolicy - API: s3:PutBucketPolicy Access Denied
Would someone be able to help me? I am using the following statements for creating a bucket:
AuctionsBucket:
Type: AWS::S3::Bucket
Properties:
BucketName: ${self:custom.AuctionsBucket.name}
AuctionsBucketPolicy:
Type: AWS::S3::BucketPolicy
Properties:
Bucket: !Ref AuctionsBucket
PolicyDocument:
Statement:
- Sid: PublicRead
Effect: Allow
Principal: '*'
Action:
- s3:GetObject
Resource: arn:aws:s3:::${self:custom.AuctionsBucket.name}/*