I have the following policy
s3Permissions:
Type: AWS::S3::BucketPolicy
Properties:
Bucket: ${self:provider.environment.S3_BUCKET}
PolicyDocument:
Id: Policy1590589947784
Version: '2012-10-17'
Statement:
- Sid: getObjectFromS3
Action:
- s3:GetObject
Effect: Allow
Resource: arn:aws:s3:::${self:provider.environment.S3_BUCKET}
Principal: "*"
I keep getting the following error when I try to deploy
An error occurred: s3Permissions - Action does not apply to any resource(s) in statement (Service: Amazon S3; Status Code: 400; Error Code: MalformedPolicy; Request ID: 3760256F6D1080A1; S3 Extended Request ID: B5vLNJkgcg1+i0///DAY/jgXDgejJgUaXbKSIA3uBfdq5KJMEeD9nLPlJWgOYZPYKTwhKdPQees=).
How do I correctly set the bucket policy?