11AWSTemplateFormatVersion : ' 2010-09-09'
22Description : ACFS3 - CloudFront with Header Security and site content
3- Transform : [ 'AWS::Serverless-2016-10-31', 'S3Objects']
3+ Transform : ' AWS::Serverless-2016-10-31'
44
55Parameters :
66 CertificateArn :
@@ -17,7 +17,6 @@ Parameters:
1717 Type : String
1818
1919Resources :
20-
2120 S3BucketLogs :
2221 Type : AWS::S3::Bucket
2322 DeletionPolicy : Retain
@@ -27,6 +26,9 @@ Resources:
2726 ServerSideEncryptionConfiguration :
2827 - ServerSideEncryptionByDefault :
2928 SSEAlgorithm : AES256
29+ Tags :
30+ - Key : Solution
31+ Value : ACFS3
3032
3133 S3BucketRoot :
3234 Type : AWS::S3::Bucket
@@ -69,6 +71,9 @@ Resources:
6971 CodeUri : ../s-headers.zip
7072 Runtime : ' nodejs12.x'
7173 Timeout : 25
74+ Tags :
75+ - Key : Solution
76+ Value : ACFS3
7277
7378 Lambdaversion :
7479 Type : AWS::Lambda::Version
@@ -79,21 +84,24 @@ Resources:
7984 LambdaEdgeFunctionRole :
8085 Type : AWS::IAM::Role
8186 Properties :
82- Path : ' /'
83- ManagedPolicyArns :
84- - ' arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole'
85- AssumeRolePolicyDocument :
86- Version : ' 2012-10-17'
87- Statement :
88- -
89- Sid : ' AllowLambdaServiceToAssumeRole'
90- Effect : ' Allow'
91- Action :
92- - ' sts:AssumeRole'
93- Principal :
94- Service :
95- - ' lambda.amazonaws.com'
96- - ' edgelambda.amazonaws.com'
87+ Path : ' /'
88+ ManagedPolicyArns :
89+ - ' arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole'
90+ AssumeRolePolicyDocument :
91+ Version : ' 2012-10-17'
92+ Statement :
93+ -
94+ Sid : ' AllowLambdaServiceToAssumeRole'
95+ Effect : ' Allow'
96+ Action :
97+ - ' sts:AssumeRole'
98+ Principal :
99+ Service :
100+ - ' lambda.amazonaws.com'
101+ - ' edgelambda.amazonaws.com'
102+ Tags :
103+ - Key : Solution
104+ Value : ACFS3
97105
98106 CloudFrontDistribution :
99107 Type : AWS::CloudFront::Distribution
@@ -137,6 +145,9 @@ Resources:
137145 AcmCertificateArn : !Ref 'CertificateArn'
138146 MinimumProtocolVersion : ' TLSv1.1_2016'
139147 SslSupportMethod : ' sni-only'
148+ Tags :
149+ - Key : Solution
150+ Value : ACFS3
140151
141152 CloudFrontOriginAccessIdentity :
142153 Type : AWS::CloudFront::CloudFrontOriginAccessIdentity
@@ -157,46 +168,6 @@ Resources:
157168 # The following HosteZoneId is always used for alias records pointing to CF.
158169 HostedZoneId : ' Z2FDTNDATAQYW2'
159170
160- CopiedIndex :
161- Type : AWS::S3::Object
162- Properties :
163- Source :
164- Bucket : !Sub 'solution-builders-${AWS::Region}'
165- Key : !Sub 'amazon-cloudfront-secure-static-site/${Release}/source/website/index.html'
166- Target :
167- Bucket : !Ref S3BucketRoot
168- Key : index.html
169-
170- CopiedOther :
171- Type : AWS::S3::Object
172- Properties :
173- Source :
174- Bucket : !Sub 'solution-builders-${AWS::Region}'
175- Key : !Sub 'amazon-cloudfront-secure-static-site/${Release}/source/website/other.html'
176- Target :
177- Bucket : !Ref S3BucketRoot
178- Key : other.html
179-
180- CopiedError :
181- Type : AWS::S3::Object
182- Properties :
183- Source :
184- Bucket : !Sub 'solution-builders-${AWS::Region}'
185- Key : !Sub 'amazon-cloudfront-secure-static-site/${Release}/source/website/404.html'
186- Target :
187- Bucket : !Ref S3BucketRoot
188- Key : 404.html
189-
190- CopiedCssStyles :
191- Type : AWS::S3::Object
192- Properties :
193- Source :
194- Bucket : !Sub 'solution-builders-${AWS::Region}'
195- Key : !Sub 'amazon-cloudfront-secure-static-site/${Release}/source/website/css/style.css'
196- Target :
197- Bucket : !Ref S3BucketRoot
198- Key : css/style.css
199-
200171Outputs :
201172 LambdaEdgeFunctionVersion :
202173 Description : Lambda@Edge Function ARN with Version
0 commit comments