Skip to content
This repository has been archived by the owner on Nov 7, 2019. It is now read-only.

Commit

Permalink
Adding Bucket Policy to Enable Accessible Sites
Browse files Browse the repository at this point in the history
**Why:**

* This sets public read for the assets in the bucket

**This change addresses the need by:**

* closes #73

Signed-off-by: Christopher Hein <me@christopherhein.com>
  • Loading branch information
christopherhein committed Sep 10, 2018
1 parent ea324ab commit 2e05ad5
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions cloudformation/s3bucket.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,28 @@ Resources:
- Status: Enabled
- !Ref 'AWS::NoValue'
DeletionPolicy: Retain

WebsiteBucketPolicy:
Type: AWS::S3::BucketPolicy
Condition: UseAsStaticSite
Properties:
Bucket: !Ref S3bucket
PolicyDocument:
Statement:
-
Action:
- "s3:GetObject"
Effect: Allow
Principal: "*"
Resource:
Fn::Join:
- ""
-
- "arn:aws:s3:::"
- !Ref S3bucket
- "/*"


LoggingBucket:
Condition: UseLogging
Type: 'AWS::S3::Bucket'
Expand Down

0 comments on commit 2e05ad5

Please sign in to comment.