-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathsite.template
More file actions
68 lines (57 loc) · 1.5 KB
/
site.template
File metadata and controls
68 lines (57 loc) · 1.5 KB
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
---
AWSTemplateFormatVersion: "2010-09-09"
Description: static site hosting.
Parameters:
ParameterScope:
Type: String
Default: /boc/updates/site
Description: The top-level scope for parameters in SM PS
Resources:
Bucket:
Type: AWS::S3::Bucket
DeletionPolicy: Delete
Properties:
AccessControl: PublicRead
WebsiteConfiguration:
IndexDocument: index.html
ErrorDocument: 404.html
BucketPolicy:
Type: AWS::S3::BucketPolicy
Properties:
Bucket: !Ref Bucket
PolicyDocument:
Id: PublicReadPolicy
Version: 2012-10-17
Statement:
- Sid: PublicReadForGetBucketObjects
Effect: Allow
Principal: '*'
Action:
- s3:GetObject
Resource:
- !Sub ${Bucket.Arn}/*
ParameterBucketArn:
Type: AWS::SSM::Parameter
Properties:
Description: Site bucket Arn
Name: !Sub ${ParameterScope}/bucket/arn
Type: String
Value: !Sub ${Bucket.Arn}
ParameterBucketName:
Type: AWS::SSM::Parameter
Properties:
Description: Site bucket name
Name: !Sub ${ParameterScope}/bucket/name
Type: String
Value: !Sub ${Bucket}
ParameterBucketUrl:
Type: AWS::SSM::Parameter
Properties:
Description: Site bucket url
Name: !Sub ${ParameterScope}/bucket/url
Type: String
Value: !Sub ${Bucket.WebsiteURL}
Outputs:
WebsiteURL:
Value: !Sub ${Bucket.WebsiteURL}
Description: S3 Website URL