-
Notifications
You must be signed in to change notification settings - Fork 2
/
bucket.yml
29 lines (27 loc) · 975 Bytes
/
bucket.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
AWSTemplateFormatVersion: 2010-09-09
Parameters:
EnvironmentName:
Description: An environment name that will be prefixed to resource names
Type: String
Resources:
S3Bucketstatic:
Type: AWS::S3::Bucket
Properties:
AccessControl: PublicRead
WebsiteConfiguration:
IndexDocument: index.html
ErrorDocument: index.html
DeletionPolicy: Retain
BucketPolicy:
Type: AWS::S3::BucketPolicy
Properties:
PolicyDocument:
Id: Static-Website-Policiy
Version: 2012-10-17
Statement:
Sid: PublicReadForGetBucketObjects
Effect: Allow
Principal: '*'
Action: 's3:GetObject'
Resource: !Join ['', ['arn:aws:s3:::', !Ref 'S3Bucketstatic', /*]]
Bucket: !Ref S3Bucketstatic