@aws-solutions-constructs/aws-cloudfront-s3 2.58.1 → 2.60.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.jsii +105 -34
- package/README.md +10 -7
- package/lib/index.d.ts +32 -17
- package/lib/index.js +33 -3
- package/package.json +8 -8
- package/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js +16 -2
- package/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +1 -0
- package/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.assets.json +15 -2
- package/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.template.json +340 -15
- package/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/manifest.json +37 -19
- package/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/tree.json +342 -63
- package/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js +16 -2
- package/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +1 -0
- package/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.assets.json +15 -2
- package/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.template.json +340 -15
- package/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/manifest.json +37 -1
- package/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/tree.json +318 -39
- package/test/integ.cfts3-bucket-with-http-origin.js.snapshot/cfts3-bucket-with-http-origin.assets.json +2 -2
- package/test/integ.cfts3-bucket-with-http-origin.js.snapshot/cfts3-bucket-with-http-origin.template.json +0 -7
- package/test/integ.cfts3-bucket-with-http-origin.js.snapshot/manifest.json +1 -1
- package/test/integ.cfts3-bucket-with-http-origin.js.snapshot/tree.json +31 -38
- package/test/integ.cfts3-cmk-provided-as-bucket-prop.js +13 -1
- package/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +1 -0
- package/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/cfts3-cmk-provided-as-bucket-prop.assets.json +15 -2
- package/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/cfts3-cmk-provided-as-bucket-prop.template.json +274 -13
- package/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/manifest.json +27 -15
- package/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/tree.json +279 -63
- package/test/integ.cfts3-custom-headers.js +5 -1
- package/test/integ.cfts3-custom-headers.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +1 -0
- package/test/integ.cfts3-custom-headers.js.snapshot/cfts3-custom-headers.assets.json +5 -5
- package/test/integ.cfts3-custom-headers.js.snapshot/cfts3-custom-headers.template.json +1 -8
- package/test/integ.cfts3-custom-headers.js.snapshot/manifest.json +1 -1
- package/test/integ.cfts3-custom-headers.js.snapshot/tree.json +48 -55
- package/test/integ.cfts3-custom-originPath.js +5 -1
- package/test/integ.cfts3-custom-originPath.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +1 -0
- package/test/integ.cfts3-custom-originPath.js.snapshot/cfts3-custom-originPath.assets.json +5 -5
- package/test/integ.cfts3-custom-originPath.js.snapshot/cfts3-custom-originPath.template.json +1 -8
- package/test/integ.cfts3-custom-originPath.js.snapshot/manifest.json +1 -1
- package/test/integ.cfts3-custom-originPath.js.snapshot/tree.json +46 -53
- package/test/integ.cfts3-customLoggingBuckets.js +6 -2
- package/test/integ.cfts3-customLoggingBuckets.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +1 -0
- package/test/integ.cfts3-customLoggingBuckets.js.snapshot/cfts3-customLoggingBuckets.assets.json +5 -5
- package/test/integ.cfts3-customLoggingBuckets.js.snapshot/cfts3-customLoggingBuckets.template.json +1 -21
- package/test/integ.cfts3-customLoggingBuckets.js.snapshot/manifest.json +1 -1
- package/test/integ.cfts3-customLoggingBuckets.js.snapshot/tree.json +46 -66
- package/test/integ.cfts3-existing-bucket.js +5 -1
- package/test/integ.cfts3-existing-bucket.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +1 -0
- package/test/integ.cfts3-existing-bucket.js.snapshot/cfts3-existing-bucket.assets.json +5 -5
- package/test/integ.cfts3-existing-bucket.js.snapshot/cfts3-existing-bucket.template.json +1 -8
- package/test/integ.cfts3-existing-bucket.js.snapshot/manifest.json +1 -1
- package/test/integ.cfts3-existing-bucket.js.snapshot/tree.json +51 -58
- package/test/integ.cfts3-no-arguments.js +5 -1
- package/test/integ.cfts3-no-arguments.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +1 -0
- package/test/integ.cfts3-no-arguments.js.snapshot/cfts3-no-arguments.assets.json +5 -5
- package/test/integ.cfts3-no-arguments.js.snapshot/cfts3-no-arguments.template.json +1 -8
- package/test/integ.cfts3-no-arguments.js.snapshot/manifest.json +1 -1
- package/test/integ.cfts3-no-arguments.js.snapshot/tree.json +46 -53
- package/test/integ.cfts3-no-logging.js +56 -0
- package/test/integ.cfts3-no-logging.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +1 -0
- package/test/integ.cfts3-no-logging.js.snapshot/cdk.out +1 -0
- package/test/integ.cfts3-no-logging.js.snapshot/cfts3-no-logging.assets.json +32 -0
- package/test/integ.cfts3-no-logging.js.snapshot/cfts3-no-logging.template.json +434 -0
- package/test/integ.cfts3-no-logging.js.snapshot/cfts3nologgingIntegDefaultTestDeployAssert18393DDB.assets.json +19 -0
- package/test/integ.cfts3-no-logging.js.snapshot/cfts3nologgingIntegDefaultTestDeployAssert18393DDB.template.json +36 -0
- package/test/integ.cfts3-no-logging.js.snapshot/integ.json +12 -0
- package/test/integ.cfts3-no-logging.js.snapshot/manifest.json +155 -0
- package/test/integ.cfts3-no-logging.js.snapshot/tree.json +506 -0
- package/test/integ.cfts3-no-security-headers.js +5 -1
- package/test/integ.cfts3-no-security-headers.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +1 -0
- package/test/integ.cfts3-no-security-headers.js.snapshot/cfts3-no-security-headers.assets.json +5 -5
- package/test/integ.cfts3-no-security-headers.js.snapshot/cfts3-no-security-headers.template.json +1 -8
- package/test/integ.cfts3-no-security-headers.js.snapshot/manifest.json +1 -1
- package/test/integ.cfts3-no-security-headers.js.snapshot/tree.json +44 -51
- package/test/test.cloudfront-s3.test.js +288 -52
- package/test/integ.cfts3-bucket-with-http-origin.js +0 -47
- package/test/integ.cfts3-custom-headers.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js +0 -1
- package/test/integ.cfts3-custom-originPath.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js +0 -1
- package/test/integ.cfts3-customLoggingBuckets.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js +0 -1
- package/test/integ.cfts3-existing-bucket.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js +0 -1
- package/test/integ.cfts3-no-arguments.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js +0 -1
- package/test/integ.cfts3-no-security-headers.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js +0 -1
- /package/test/{integ.cfts3-bucket-with-http-origin.d.ts → integ.cfts3-no-logging.d.ts} +0 -0
|
@@ -0,0 +1,434 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Description": "Integration Test for aws-cloudfront-s3",
|
|
3
|
+
"Resources": {
|
|
4
|
+
"testcloudfronts3S3BucketE0C5F76E": {
|
|
5
|
+
"Type": "AWS::S3::Bucket",
|
|
6
|
+
"Properties": {
|
|
7
|
+
"BucketEncryption": {
|
|
8
|
+
"ServerSideEncryptionConfiguration": [
|
|
9
|
+
{
|
|
10
|
+
"ServerSideEncryptionByDefault": {
|
|
11
|
+
"SSEAlgorithm": "AES256"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
},
|
|
16
|
+
"LifecycleConfiguration": {
|
|
17
|
+
"Rules": [
|
|
18
|
+
{
|
|
19
|
+
"NoncurrentVersionTransitions": [
|
|
20
|
+
{
|
|
21
|
+
"StorageClass": "GLACIER",
|
|
22
|
+
"TransitionInDays": 90
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"Status": "Enabled"
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
"PublicAccessBlockConfiguration": {
|
|
30
|
+
"BlockPublicAcls": true,
|
|
31
|
+
"BlockPublicPolicy": true,
|
|
32
|
+
"IgnorePublicAcls": true,
|
|
33
|
+
"RestrictPublicBuckets": true
|
|
34
|
+
},
|
|
35
|
+
"Tags": [
|
|
36
|
+
{
|
|
37
|
+
"Key": "aws-cdk:auto-delete-objects",
|
|
38
|
+
"Value": "true"
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
"VersioningConfiguration": {
|
|
42
|
+
"Status": "Enabled"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"UpdateReplacePolicy": "Delete",
|
|
46
|
+
"DeletionPolicy": "Delete",
|
|
47
|
+
"Metadata": {
|
|
48
|
+
"cfn_nag": {
|
|
49
|
+
"rules_to_suppress": [
|
|
50
|
+
{
|
|
51
|
+
"id": "W35",
|
|
52
|
+
"reason": "Test case only"
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"testcloudfronts3S3BucketPolicy250F1F61": {
|
|
59
|
+
"Type": "AWS::S3::BucketPolicy",
|
|
60
|
+
"Properties": {
|
|
61
|
+
"Bucket": {
|
|
62
|
+
"Ref": "testcloudfronts3S3BucketE0C5F76E"
|
|
63
|
+
},
|
|
64
|
+
"PolicyDocument": {
|
|
65
|
+
"Statement": [
|
|
66
|
+
{
|
|
67
|
+
"Action": "s3:*",
|
|
68
|
+
"Condition": {
|
|
69
|
+
"Bool": {
|
|
70
|
+
"aws:SecureTransport": "false"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"Effect": "Deny",
|
|
74
|
+
"Principal": {
|
|
75
|
+
"AWS": "*"
|
|
76
|
+
},
|
|
77
|
+
"Resource": [
|
|
78
|
+
{
|
|
79
|
+
"Fn::GetAtt": [
|
|
80
|
+
"testcloudfronts3S3BucketE0C5F76E",
|
|
81
|
+
"Arn"
|
|
82
|
+
]
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"Fn::Join": [
|
|
86
|
+
"",
|
|
87
|
+
[
|
|
88
|
+
{
|
|
89
|
+
"Fn::GetAtt": [
|
|
90
|
+
"testcloudfronts3S3BucketE0C5F76E",
|
|
91
|
+
"Arn"
|
|
92
|
+
]
|
|
93
|
+
},
|
|
94
|
+
"/*"
|
|
95
|
+
]
|
|
96
|
+
]
|
|
97
|
+
}
|
|
98
|
+
]
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"Action": [
|
|
102
|
+
"s3:DeleteObject*",
|
|
103
|
+
"s3:GetBucket*",
|
|
104
|
+
"s3:List*",
|
|
105
|
+
"s3:PutBucketPolicy"
|
|
106
|
+
],
|
|
107
|
+
"Effect": "Allow",
|
|
108
|
+
"Principal": {
|
|
109
|
+
"AWS": {
|
|
110
|
+
"Fn::GetAtt": [
|
|
111
|
+
"CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092",
|
|
112
|
+
"Arn"
|
|
113
|
+
]
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
"Resource": [
|
|
117
|
+
{
|
|
118
|
+
"Fn::GetAtt": [
|
|
119
|
+
"testcloudfronts3S3BucketE0C5F76E",
|
|
120
|
+
"Arn"
|
|
121
|
+
]
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"Fn::Join": [
|
|
125
|
+
"",
|
|
126
|
+
[
|
|
127
|
+
{
|
|
128
|
+
"Fn::GetAtt": [
|
|
129
|
+
"testcloudfronts3S3BucketE0C5F76E",
|
|
130
|
+
"Arn"
|
|
131
|
+
]
|
|
132
|
+
},
|
|
133
|
+
"/*"
|
|
134
|
+
]
|
|
135
|
+
]
|
|
136
|
+
}
|
|
137
|
+
]
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"Action": "s3:GetObject",
|
|
141
|
+
"Condition": {
|
|
142
|
+
"StringEquals": {
|
|
143
|
+
"AWS:SourceArn": {
|
|
144
|
+
"Fn::Join": [
|
|
145
|
+
"",
|
|
146
|
+
[
|
|
147
|
+
"arn:aws:cloudfront::",
|
|
148
|
+
{
|
|
149
|
+
"Ref": "AWS::AccountId"
|
|
150
|
+
},
|
|
151
|
+
":distribution/",
|
|
152
|
+
{
|
|
153
|
+
"Ref": "testcloudfronts3CloudFrontDistribution0565DEE8"
|
|
154
|
+
}
|
|
155
|
+
]
|
|
156
|
+
]
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
"Effect": "Allow",
|
|
161
|
+
"Principal": {
|
|
162
|
+
"Service": "cloudfront.amazonaws.com"
|
|
163
|
+
},
|
|
164
|
+
"Resource": {
|
|
165
|
+
"Fn::Join": [
|
|
166
|
+
"",
|
|
167
|
+
[
|
|
168
|
+
{
|
|
169
|
+
"Fn::GetAtt": [
|
|
170
|
+
"testcloudfronts3S3BucketE0C5F76E",
|
|
171
|
+
"Arn"
|
|
172
|
+
]
|
|
173
|
+
},
|
|
174
|
+
"/*"
|
|
175
|
+
]
|
|
176
|
+
]
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
],
|
|
180
|
+
"Version": "2012-10-17"
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
"Metadata": {
|
|
184
|
+
"cfn_nag": {
|
|
185
|
+
"rules_to_suppress": [
|
|
186
|
+
{
|
|
187
|
+
"id": "F16",
|
|
188
|
+
"reason": "Public website bucket policy requires a wildcard principal"
|
|
189
|
+
}
|
|
190
|
+
]
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
"testcloudfronts3S3BucketAutoDeleteObjectsCustomResourceA13DD8F7": {
|
|
195
|
+
"Type": "Custom::S3AutoDeleteObjects",
|
|
196
|
+
"Properties": {
|
|
197
|
+
"ServiceToken": {
|
|
198
|
+
"Fn::GetAtt": [
|
|
199
|
+
"CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F",
|
|
200
|
+
"Arn"
|
|
201
|
+
]
|
|
202
|
+
},
|
|
203
|
+
"BucketName": {
|
|
204
|
+
"Ref": "testcloudfronts3S3BucketE0C5F76E"
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
"DependsOn": [
|
|
208
|
+
"testcloudfronts3S3BucketPolicy250F1F61"
|
|
209
|
+
],
|
|
210
|
+
"UpdateReplacePolicy": "Delete",
|
|
211
|
+
"DeletionPolicy": "Delete"
|
|
212
|
+
},
|
|
213
|
+
"testcloudfronts3SetHttpSecurityHeaders6C5A1E69": {
|
|
214
|
+
"Type": "AWS::CloudFront::Function",
|
|
215
|
+
"Properties": {
|
|
216
|
+
"AutoPublish": true,
|
|
217
|
+
"FunctionCode": "function handler(event) { var response = event.response; var headers = response.headers; headers['strict-transport-security'] = { value: 'max-age=63072000; includeSubdomains; preload'}; headers['content-security-policy'] = { value: \"default-src 'none'; img-src 'self'; script-src 'self'; style-src 'self'; object-src 'none'\"}; headers['x-content-type-options'] = { value: 'nosniff'}; headers['x-frame-options'] = {value: 'DENY'}; headers['x-xss-protection'] = {value: '1; mode=block'}; return response; }",
|
|
218
|
+
"FunctionConfig": {
|
|
219
|
+
"Comment": "SetHttpSecurityHeadersc8bdfbb6e2803af376fb302dc008562b2ae50a02bb",
|
|
220
|
+
"Runtime": "cloudfront-js-1.0"
|
|
221
|
+
},
|
|
222
|
+
"Name": "SetHttpSecurityHeadersc8bdfbb6e2803af376fb302dc008562b2ae50a02bb"
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
"testcloudfronts3CloudFrontOac7A951AA6": {
|
|
226
|
+
"Type": "AWS::CloudFront::OriginAccessControl",
|
|
227
|
+
"Properties": {
|
|
228
|
+
"OriginAccessControlConfig": {
|
|
229
|
+
"Description": "Origin access control provisioned by aws-cloudfront-s3",
|
|
230
|
+
"Name": {
|
|
231
|
+
"Fn::Join": [
|
|
232
|
+
"",
|
|
233
|
+
[
|
|
234
|
+
"aws-cloudfront-s3-testnt-s3-",
|
|
235
|
+
{
|
|
236
|
+
"Fn::Select": [
|
|
237
|
+
2,
|
|
238
|
+
{
|
|
239
|
+
"Fn::Split": [
|
|
240
|
+
"/",
|
|
241
|
+
{
|
|
242
|
+
"Ref": "AWS::StackId"
|
|
243
|
+
}
|
|
244
|
+
]
|
|
245
|
+
}
|
|
246
|
+
]
|
|
247
|
+
}
|
|
248
|
+
]
|
|
249
|
+
]
|
|
250
|
+
},
|
|
251
|
+
"OriginAccessControlOriginType": "s3",
|
|
252
|
+
"SigningBehavior": "always",
|
|
253
|
+
"SigningProtocol": "sigv4"
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
"testcloudfronts3CloudFrontDistribution0565DEE8": {
|
|
258
|
+
"Type": "AWS::CloudFront::Distribution",
|
|
259
|
+
"Properties": {
|
|
260
|
+
"DistributionConfig": {
|
|
261
|
+
"DefaultCacheBehavior": {
|
|
262
|
+
"CachePolicyId": "658327ea-f89d-4fab-a63d-7e88639e58f6",
|
|
263
|
+
"Compress": true,
|
|
264
|
+
"FunctionAssociations": [
|
|
265
|
+
{
|
|
266
|
+
"EventType": "viewer-response",
|
|
267
|
+
"FunctionARN": {
|
|
268
|
+
"Fn::GetAtt": [
|
|
269
|
+
"testcloudfronts3SetHttpSecurityHeaders6C5A1E69",
|
|
270
|
+
"FunctionARN"
|
|
271
|
+
]
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
],
|
|
275
|
+
"TargetOriginId": "cfts3nologgingtestcloudfronts3CloudFrontDistributionOrigin1C951FD12",
|
|
276
|
+
"ViewerProtocolPolicy": "redirect-to-https"
|
|
277
|
+
},
|
|
278
|
+
"DefaultRootObject": "index.html",
|
|
279
|
+
"Enabled": true,
|
|
280
|
+
"HttpVersion": "http2",
|
|
281
|
+
"IPV6Enabled": true,
|
|
282
|
+
"Origins": [
|
|
283
|
+
{
|
|
284
|
+
"DomainName": {
|
|
285
|
+
"Fn::GetAtt": [
|
|
286
|
+
"testcloudfronts3S3BucketE0C5F76E",
|
|
287
|
+
"RegionalDomainName"
|
|
288
|
+
]
|
|
289
|
+
},
|
|
290
|
+
"Id": "cfts3nologgingtestcloudfronts3CloudFrontDistributionOrigin1C951FD12",
|
|
291
|
+
"OriginAccessControlId": {
|
|
292
|
+
"Fn::GetAtt": [
|
|
293
|
+
"testcloudfronts3CloudFrontOac7A951AA6",
|
|
294
|
+
"Id"
|
|
295
|
+
]
|
|
296
|
+
},
|
|
297
|
+
"S3OriginConfig": {
|
|
298
|
+
"OriginAccessIdentity": ""
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
]
|
|
302
|
+
}
|
|
303
|
+
},
|
|
304
|
+
"Metadata": {
|
|
305
|
+
"cfn_nag": {
|
|
306
|
+
"rules_to_suppress": [
|
|
307
|
+
{
|
|
308
|
+
"id": "W70",
|
|
309
|
+
"reason": "Since the distribution uses the CloudFront domain name, CloudFront automatically sets the security policy to TLSv1 regardless of the value of MinimumProtocolVersion"
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
"id": "W10",
|
|
313
|
+
"reason": "Test case only"
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
"id": "W35",
|
|
317
|
+
"reason": "Test case only"
|
|
318
|
+
}
|
|
319
|
+
]
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
},
|
|
323
|
+
"CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092": {
|
|
324
|
+
"Type": "AWS::IAM::Role",
|
|
325
|
+
"Properties": {
|
|
326
|
+
"AssumeRolePolicyDocument": {
|
|
327
|
+
"Version": "2012-10-17",
|
|
328
|
+
"Statement": [
|
|
329
|
+
{
|
|
330
|
+
"Action": "sts:AssumeRole",
|
|
331
|
+
"Effect": "Allow",
|
|
332
|
+
"Principal": {
|
|
333
|
+
"Service": "lambda.amazonaws.com"
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
]
|
|
337
|
+
},
|
|
338
|
+
"ManagedPolicyArns": [
|
|
339
|
+
{
|
|
340
|
+
"Fn::Sub": "arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
|
|
341
|
+
}
|
|
342
|
+
]
|
|
343
|
+
}
|
|
344
|
+
},
|
|
345
|
+
"CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F": {
|
|
346
|
+
"Type": "AWS::Lambda::Function",
|
|
347
|
+
"Properties": {
|
|
348
|
+
"Code": {
|
|
349
|
+
"S3Bucket": {
|
|
350
|
+
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
|
|
351
|
+
},
|
|
352
|
+
"S3Key": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip"
|
|
353
|
+
},
|
|
354
|
+
"Timeout": 900,
|
|
355
|
+
"MemorySize": 128,
|
|
356
|
+
"Handler": "index.handler",
|
|
357
|
+
"Role": {
|
|
358
|
+
"Fn::GetAtt": [
|
|
359
|
+
"CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092",
|
|
360
|
+
"Arn"
|
|
361
|
+
]
|
|
362
|
+
},
|
|
363
|
+
"Runtime": "nodejs18.x",
|
|
364
|
+
"Description": {
|
|
365
|
+
"Fn::Join": [
|
|
366
|
+
"",
|
|
367
|
+
[
|
|
368
|
+
"Lambda function for auto-deleting objects in ",
|
|
369
|
+
{
|
|
370
|
+
"Ref": "testcloudfronts3S3BucketE0C5F76E"
|
|
371
|
+
},
|
|
372
|
+
" S3 bucket."
|
|
373
|
+
]
|
|
374
|
+
]
|
|
375
|
+
}
|
|
376
|
+
},
|
|
377
|
+
"DependsOn": [
|
|
378
|
+
"CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092"
|
|
379
|
+
],
|
|
380
|
+
"Metadata": {
|
|
381
|
+
"cfn_nag": {
|
|
382
|
+
"rules_to_suppress": [
|
|
383
|
+
{
|
|
384
|
+
"id": "W58",
|
|
385
|
+
"reason": "CDK generated custom resource"
|
|
386
|
+
},
|
|
387
|
+
{
|
|
388
|
+
"id": "W89",
|
|
389
|
+
"reason": "CDK generated custom resource"
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
"id": "W92",
|
|
393
|
+
"reason": "CDK generated custom resource"
|
|
394
|
+
}
|
|
395
|
+
]
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
},
|
|
400
|
+
"Parameters": {
|
|
401
|
+
"BootstrapVersion": {
|
|
402
|
+
"Type": "AWS::SSM::Parameter::Value<String>",
|
|
403
|
+
"Default": "/cdk-bootstrap/hnb659fds/version",
|
|
404
|
+
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
|
|
405
|
+
}
|
|
406
|
+
},
|
|
407
|
+
"Rules": {
|
|
408
|
+
"CheckBootstrapVersion": {
|
|
409
|
+
"Assertions": [
|
|
410
|
+
{
|
|
411
|
+
"Assert": {
|
|
412
|
+
"Fn::Not": [
|
|
413
|
+
{
|
|
414
|
+
"Fn::Contains": [
|
|
415
|
+
[
|
|
416
|
+
"1",
|
|
417
|
+
"2",
|
|
418
|
+
"3",
|
|
419
|
+
"4",
|
|
420
|
+
"5"
|
|
421
|
+
],
|
|
422
|
+
{
|
|
423
|
+
"Ref": "BootstrapVersion"
|
|
424
|
+
}
|
|
425
|
+
]
|
|
426
|
+
}
|
|
427
|
+
]
|
|
428
|
+
},
|
|
429
|
+
"AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
|
|
430
|
+
}
|
|
431
|
+
]
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "36.0.0",
|
|
3
|
+
"files": {
|
|
4
|
+
"21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": {
|
|
5
|
+
"source": {
|
|
6
|
+
"path": "cfts3nologgingIntegDefaultTestDeployAssert18393DDB.template.json",
|
|
7
|
+
"packaging": "file"
|
|
8
|
+
},
|
|
9
|
+
"destinations": {
|
|
10
|
+
"current_account-current_region": {
|
|
11
|
+
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
|
|
12
|
+
"objectKey": "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json",
|
|
13
|
+
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"dockerImages": {}
|
|
19
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Parameters": {
|
|
3
|
+
"BootstrapVersion": {
|
|
4
|
+
"Type": "AWS::SSM::Parameter::Value<String>",
|
|
5
|
+
"Default": "/cdk-bootstrap/hnb659fds/version",
|
|
6
|
+
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
|
|
7
|
+
}
|
|
8
|
+
},
|
|
9
|
+
"Rules": {
|
|
10
|
+
"CheckBootstrapVersion": {
|
|
11
|
+
"Assertions": [
|
|
12
|
+
{
|
|
13
|
+
"Assert": {
|
|
14
|
+
"Fn::Not": [
|
|
15
|
+
{
|
|
16
|
+
"Fn::Contains": [
|
|
17
|
+
[
|
|
18
|
+
"1",
|
|
19
|
+
"2",
|
|
20
|
+
"3",
|
|
21
|
+
"4",
|
|
22
|
+
"5"
|
|
23
|
+
],
|
|
24
|
+
{
|
|
25
|
+
"Ref": "BootstrapVersion"
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
"AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "36.0.0",
|
|
3
|
+
"testCases": {
|
|
4
|
+
"cfts3-no-logging/Integ/DefaultTest": {
|
|
5
|
+
"stacks": [
|
|
6
|
+
"cfts3-no-logging"
|
|
7
|
+
],
|
|
8
|
+
"assertionStack": "cfts3-no-logging/Integ/DefaultTest/DeployAssert",
|
|
9
|
+
"assertionStackName": "cfts3nologgingIntegDefaultTestDeployAssert18393DDB"
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "36.0.0",
|
|
3
|
+
"artifacts": {
|
|
4
|
+
"cfts3nologgingIntegDefaultTestDeployAssert18393DDB.assets": {
|
|
5
|
+
"type": "cdk:asset-manifest",
|
|
6
|
+
"properties": {
|
|
7
|
+
"file": "cfts3nologgingIntegDefaultTestDeployAssert18393DDB.assets.json",
|
|
8
|
+
"requiresBootstrapStackVersion": 6,
|
|
9
|
+
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"cfts3nologgingIntegDefaultTestDeployAssert18393DDB": {
|
|
13
|
+
"type": "aws:cloudformation:stack",
|
|
14
|
+
"environment": "aws://unknown-account/unknown-region",
|
|
15
|
+
"properties": {
|
|
16
|
+
"templateFile": "cfts3nologgingIntegDefaultTestDeployAssert18393DDB.template.json",
|
|
17
|
+
"terminationProtection": false,
|
|
18
|
+
"validateOnSynth": false,
|
|
19
|
+
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}",
|
|
20
|
+
"cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}",
|
|
21
|
+
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json",
|
|
22
|
+
"requiresBootstrapStackVersion": 6,
|
|
23
|
+
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
|
|
24
|
+
"additionalDependencies": [
|
|
25
|
+
"cfts3nologgingIntegDefaultTestDeployAssert18393DDB.assets"
|
|
26
|
+
],
|
|
27
|
+
"lookupRole": {
|
|
28
|
+
"arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}",
|
|
29
|
+
"requiresBootstrapStackVersion": 8,
|
|
30
|
+
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"dependencies": [
|
|
34
|
+
"cfts3nologgingIntegDefaultTestDeployAssert18393DDB.assets"
|
|
35
|
+
],
|
|
36
|
+
"metadata": {
|
|
37
|
+
"/cfts3-no-logging/Integ/DefaultTest/DeployAssert/BootstrapVersion": [
|
|
38
|
+
{
|
|
39
|
+
"type": "aws:cdk:logicalId",
|
|
40
|
+
"data": "BootstrapVersion"
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
"/cfts3-no-logging/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion": [
|
|
44
|
+
{
|
|
45
|
+
"type": "aws:cdk:logicalId",
|
|
46
|
+
"data": "CheckBootstrapVersion"
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
"displayName": "cfts3-no-logging/Integ/DefaultTest/DeployAssert"
|
|
51
|
+
},
|
|
52
|
+
"cfts3-no-logging.assets": {
|
|
53
|
+
"type": "cdk:asset-manifest",
|
|
54
|
+
"properties": {
|
|
55
|
+
"file": "cfts3-no-logging.assets.json",
|
|
56
|
+
"requiresBootstrapStackVersion": 6,
|
|
57
|
+
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"cfts3-no-logging": {
|
|
61
|
+
"type": "aws:cloudformation:stack",
|
|
62
|
+
"environment": "aws://unknown-account/unknown-region",
|
|
63
|
+
"properties": {
|
|
64
|
+
"templateFile": "cfts3-no-logging.template.json",
|
|
65
|
+
"terminationProtection": false,
|
|
66
|
+
"validateOnSynth": false,
|
|
67
|
+
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}",
|
|
68
|
+
"cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}",
|
|
69
|
+
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/4c525710315524310fe48071370bc56910286d917d2220bd18ba5eb8289bea35.json",
|
|
70
|
+
"requiresBootstrapStackVersion": 6,
|
|
71
|
+
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
|
|
72
|
+
"additionalDependencies": [
|
|
73
|
+
"cfts3-no-logging.assets"
|
|
74
|
+
],
|
|
75
|
+
"lookupRole": {
|
|
76
|
+
"arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}",
|
|
77
|
+
"requiresBootstrapStackVersion": 8,
|
|
78
|
+
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"dependencies": [
|
|
82
|
+
"cfts3-no-logging.assets"
|
|
83
|
+
],
|
|
84
|
+
"metadata": {
|
|
85
|
+
"/cfts3-no-logging/test-cloudfront-s3/S3Bucket/Resource": [
|
|
86
|
+
{
|
|
87
|
+
"type": "aws:cdk:logicalId",
|
|
88
|
+
"data": "testcloudfronts3S3BucketE0C5F76E"
|
|
89
|
+
}
|
|
90
|
+
],
|
|
91
|
+
"/cfts3-no-logging/test-cloudfront-s3/S3Bucket/Policy/Resource": [
|
|
92
|
+
{
|
|
93
|
+
"type": "aws:cdk:logicalId",
|
|
94
|
+
"data": "testcloudfronts3S3BucketPolicy250F1F61"
|
|
95
|
+
}
|
|
96
|
+
],
|
|
97
|
+
"/cfts3-no-logging/test-cloudfront-s3/S3Bucket/AutoDeleteObjectsCustomResource/Default": [
|
|
98
|
+
{
|
|
99
|
+
"type": "aws:cdk:logicalId",
|
|
100
|
+
"data": "testcloudfronts3S3BucketAutoDeleteObjectsCustomResourceA13DD8F7"
|
|
101
|
+
}
|
|
102
|
+
],
|
|
103
|
+
"/cfts3-no-logging/test-cloudfront-s3/SetHttpSecurityHeaders/Resource": [
|
|
104
|
+
{
|
|
105
|
+
"type": "aws:cdk:logicalId",
|
|
106
|
+
"data": "testcloudfronts3SetHttpSecurityHeaders6C5A1E69"
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
"/cfts3-no-logging/test-cloudfront-s3/CloudFrontOac": [
|
|
110
|
+
{
|
|
111
|
+
"type": "aws:cdk:logicalId",
|
|
112
|
+
"data": "testcloudfronts3CloudFrontOac7A951AA6"
|
|
113
|
+
}
|
|
114
|
+
],
|
|
115
|
+
"/cfts3-no-logging/test-cloudfront-s3/CloudFrontDistribution/Resource": [
|
|
116
|
+
{
|
|
117
|
+
"type": "aws:cdk:logicalId",
|
|
118
|
+
"data": "testcloudfronts3CloudFrontDistribution0565DEE8"
|
|
119
|
+
}
|
|
120
|
+
],
|
|
121
|
+
"/cfts3-no-logging/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [
|
|
122
|
+
{
|
|
123
|
+
"type": "aws:cdk:logicalId",
|
|
124
|
+
"data": "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092"
|
|
125
|
+
}
|
|
126
|
+
],
|
|
127
|
+
"/cfts3-no-logging/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler": [
|
|
128
|
+
{
|
|
129
|
+
"type": "aws:cdk:logicalId",
|
|
130
|
+
"data": "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F"
|
|
131
|
+
}
|
|
132
|
+
],
|
|
133
|
+
"/cfts3-no-logging/BootstrapVersion": [
|
|
134
|
+
{
|
|
135
|
+
"type": "aws:cdk:logicalId",
|
|
136
|
+
"data": "BootstrapVersion"
|
|
137
|
+
}
|
|
138
|
+
],
|
|
139
|
+
"/cfts3-no-logging/CheckBootstrapVersion": [
|
|
140
|
+
{
|
|
141
|
+
"type": "aws:cdk:logicalId",
|
|
142
|
+
"data": "CheckBootstrapVersion"
|
|
143
|
+
}
|
|
144
|
+
]
|
|
145
|
+
},
|
|
146
|
+
"displayName": "cfts3-no-logging"
|
|
147
|
+
},
|
|
148
|
+
"Tree": {
|
|
149
|
+
"type": "cdk:tree",
|
|
150
|
+
"properties": {
|
|
151
|
+
"file": "tree.json"
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|