Skip to content

AWS::S3::BucketPolicy

Properties

Type: AWS::S3::BucketPolicy
Properties:
  Bucket: String
  PolicyDocument: Json

PolicyDocument

// bucket policy
{
  "Version": "2012-10-17",
  "Id": "S3-Read-Access",
  "Statement": [
    {
      "Sid": "PublicRead",
      "Effect": "Allow",
      "Action": ["s3:Get*", "s3:List*"],
      "Resource": "arn:aws:s3:::mybucket/*",
      "Principal": "*"
    }
  ]
}
  • Example of policy: deny upload of object that are not encrypted