sls-base icon indicating copy to clipboard operation
sls-base copied to clipboard

AuctionsBucketPolicy - API: s3:PutBucketPolicy Access Denied

Open shahmir811 opened this issue 1 year ago • 0 comments

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}/*

shahmir811 avatar May 23 '23 05:05 shahmir811