I am having some trouble adding a policy to my s3 bucket. I keep getting this error
Error: The CloudFormation template is invalid: Invalid template property or properties [BucketPolicy]
Here is the policy I have
BucketPolicy:
Type: AWS::S3::BucketPolicy
Properties:
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: "*"
Questions:
- How would I debug this, how can I tell what part of that is invalid
- How do I set the bucket policy to allow for pre-signed URL downloads?