Skip to content

Instantly share code, notes, and snippets.

@acantril
Created February 3, 2017 02:45
Show Gist options
  • Save acantril/3a931593cffc65de8eaaeda95f5da07b to your computer and use it in GitHub Desktop.
Save acantril/3a931593cffc65de8eaaeda95f5da07b to your computer and use it in GitHub Desktop.
Resources:
s3bucket:
Type: "AWS::S3::Bucket"
Properties:
AccessControl: PublicRead
WebsiteConfiguration:
ErrorDocument: index.html
IndexDocument: index.html
bucketpolicy:
Type: "AWS::S3::BucketPolicy"
Properties:
Bucket: !Ref s3bucket
PolicyDocument:
Statement:
-
Sid: "ABC123"
Action:
- "s3:GetObject"
Effect: Allow
Resource: !Join ["", ["arn:aws:s3:::", !Ref s3bucket, "/*"]]
Principal:
AWS:
- "*"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment