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

Commit 1f2e700

Browse files
author
Christopher Hein
authored
Merge pull request #75 from christopherhein/bug/73-add-bucket-policy
Adding Bucket Policy to Enable Accessible Sites
2 parents ea324ab + 2e05ad5 commit 1f2e700

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

cloudformation/s3bucket.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,28 @@ Resources:
143143
- Status: Enabled
144144
- !Ref 'AWS::NoValue'
145145
DeletionPolicy: Retain
146+
147+
WebsiteBucketPolicy:
148+
Type: AWS::S3::BucketPolicy
149+
Condition: UseAsStaticSite
150+
Properties:
151+
Bucket: !Ref S3bucket
152+
PolicyDocument:
153+
Statement:
154+
-
155+
Action:
156+
- "s3:GetObject"
157+
Effect: Allow
158+
Principal: "*"
159+
Resource:
160+
Fn::Join:
161+
- ""
162+
-
163+
- "arn:aws:s3:::"
164+
- !Ref S3bucket
165+
- "/*"
166+
167+
146168
LoggingBucket:
147169
Condition: UseLogging
148170
Type: 'AWS::S3::Bucket'

0 commit comments

Comments
 (0)