@aws-solutions-constructs/aws-cloudfront-s3 2.51.0 → 2.52.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.
Files changed (127) hide show
  1. package/.eslintignore +2 -0
  2. package/.jsii +50 -5
  3. package/integ.config.json +7 -0
  4. package/lib/index.js +1 -1
  5. package/package.json +11 -10
  6. package/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js +6 -3
  7. package/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/asset.4a4b024f310aca2784b69bcb790e9ccaef785e9ad5d1b73624144f88c4465b4f/index.d.ts +30 -0
  8. package/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/asset.4a4b024f310aca2784b69bcb790e9ccaef785e9ad5d1b73624144f88c4465b4f/index.js +127 -0
  9. package/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/asset.7382a0addb9f34974a1ea6c6c9b063882af874828f366f5c93b2b7b64db15c94/cfn-response.js +1 -0
  10. package/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/asset.7382a0addb9f34974a1ea6c6c9b063882af874828f366f5c93b2b7b64db15c94/consts.js +1 -0
  11. package/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/asset.7382a0addb9f34974a1ea6c6c9b063882af874828f366f5c93b2b7b64db15c94/framework.js +3 -0
  12. package/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/asset.7382a0addb9f34974a1ea6c6c9b063882af874828f366f5c93b2b7b64db15c94/outbound.js +1 -0
  13. package/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/asset.7382a0addb9f34974a1ea6c6c9b063882af874828f366f5c93b2b7b64db15c94/util.js +1 -0
  14. package/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/cdk.out +1 -0
  15. package/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.assets.json +45 -0
  16. package/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.template.json +960 -0
  17. package/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/cfts3bucketencryptedwithcmkprovidedasexistingbucketIntegDefaultTestDeployAssertF6031114.assets.json +19 -0
  18. package/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/cfts3bucketencryptedwithcmkprovidedasexistingbucketIntegDefaultTestDeployAssertF6031114.template.json +36 -0
  19. package/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/integ.json +12 -0
  20. package/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/manifest.json +221 -0
  21. package/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/tree.json +1326 -0
  22. package/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js +6 -3
  23. package/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/cdk.out +1 -0
  24. 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 +19 -0
  25. 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 +594 -0
  26. package/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/cfts3bucketencryptedwithmanagedkeyprovidedasexistingbucketIntegDefaultTestDeployAssert03A82C16.assets.json +19 -0
  27. package/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/cfts3bucketencryptedwithmanagedkeyprovidedasexistingbucketIntegDefaultTestDeployAssert03A82C16.template.json +36 -0
  28. package/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/integ.json +12 -0
  29. package/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/manifest.json +167 -0
  30. package/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/tree.json +790 -0
  31. package/test/integ.cfts3-bucket-with-http-origin.js +6 -3
  32. package/test/integ.cfts3-bucket-with-http-origin.js.snapshot/cdk.out +1 -0
  33. package/test/integ.cfts3-bucket-with-http-origin.js.snapshot/cfts3-bucket-with-http-origin.assets.json +19 -0
  34. package/test/integ.cfts3-bucket-with-http-origin.js.snapshot/cfts3-bucket-with-http-origin.template.json +559 -0
  35. package/test/integ.cfts3-bucket-with-http-origin.js.snapshot/cfts3bucketwithhttporiginIntegDefaultTestDeployAssert75EB76AB.assets.json +19 -0
  36. package/test/integ.cfts3-bucket-with-http-origin.js.snapshot/cfts3bucketwithhttporiginIntegDefaultTestDeployAssert75EB76AB.template.json +36 -0
  37. package/test/integ.cfts3-bucket-with-http-origin.js.snapshot/integ.json +12 -0
  38. package/test/integ.cfts3-bucket-with-http-origin.js.snapshot/manifest.json +161 -0
  39. package/test/integ.cfts3-bucket-with-http-origin.js.snapshot/tree.json +753 -0
  40. package/test/integ.cfts3-cmk-provided-as-bucket-prop.js +6 -3
  41. package/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/asset.4a4b024f310aca2784b69bcb790e9ccaef785e9ad5d1b73624144f88c4465b4f/index.d.ts +30 -0
  42. package/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/asset.4a4b024f310aca2784b69bcb790e9ccaef785e9ad5d1b73624144f88c4465b4f/index.js +127 -0
  43. package/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/asset.7382a0addb9f34974a1ea6c6c9b063882af874828f366f5c93b2b7b64db15c94/cfn-response.js +1 -0
  44. package/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/asset.7382a0addb9f34974a1ea6c6c9b063882af874828f366f5c93b2b7b64db15c94/consts.js +1 -0
  45. package/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/asset.7382a0addb9f34974a1ea6c6c9b063882af874828f366f5c93b2b7b64db15c94/framework.js +3 -0
  46. package/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/asset.7382a0addb9f34974a1ea6c6c9b063882af874828f366f5c93b2b7b64db15c94/outbound.js +1 -0
  47. package/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/asset.7382a0addb9f34974a1ea6c6c9b063882af874828f366f5c93b2b7b64db15c94/util.js +1 -0
  48. package/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/cdk.out +1 -0
  49. package/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/cfts3-cmk-provided-as-bucket-prop.assets.json +45 -0
  50. package/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/cfts3-cmk-provided-as-bucket-prop.template.json +960 -0
  51. package/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/cfts3cmkprovidedasbucketpropIntegDefaultTestDeployAssert38E63D55.assets.json +19 -0
  52. package/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/cfts3cmkprovidedasbucketpropIntegDefaultTestDeployAssert38E63D55.template.json +36 -0
  53. package/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/integ.json +12 -0
  54. package/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/manifest.json +221 -0
  55. package/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/tree.json +1326 -0
  56. package/test/integ.cfts3-custom-headers.js +6 -3
  57. package/test/integ.cfts3-custom-headers.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js +1 -0
  58. package/test/integ.cfts3-custom-headers.js.snapshot/cdk.out +1 -0
  59. package/test/integ.cfts3-custom-headers.js.snapshot/cfts3-custom-headers.assets.json +32 -0
  60. package/test/integ.cfts3-custom-headers.js.snapshot/cfts3-custom-headers.template.json +981 -0
  61. package/test/integ.cfts3-custom-headers.js.snapshot/cfts3customheadersIntegDefaultTestDeployAssert6EEC9973.assets.json +19 -0
  62. package/test/integ.cfts3-custom-headers.js.snapshot/cfts3customheadersIntegDefaultTestDeployAssert6EEC9973.template.json +36 -0
  63. package/test/integ.cfts3-custom-headers.js.snapshot/integ.json +12 -0
  64. package/test/integ.cfts3-custom-headers.js.snapshot/manifest.json +215 -0
  65. package/test/integ.cfts3-custom-headers.js.snapshot/tree.json +1167 -0
  66. package/test/integ.cfts3-custom-originPath.js +6 -3
  67. package/test/integ.cfts3-custom-originPath.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js +1 -0
  68. package/test/integ.cfts3-custom-originPath.js.snapshot/cdk.out +1 -0
  69. package/test/integ.cfts3-custom-originPath.js.snapshot/cfts3-custom-originPath.assets.json +32 -0
  70. package/test/integ.cfts3-custom-originPath.js.snapshot/cfts3-custom-originPath.template.json +950 -0
  71. package/test/integ.cfts3-custom-originPath.js.snapshot/cfts3customoriginPathIntegDefaultTestDeployAssert61F499B2.assets.json +19 -0
  72. package/test/integ.cfts3-custom-originPath.js.snapshot/cfts3customoriginPathIntegDefaultTestDeployAssert61F499B2.template.json +36 -0
  73. package/test/integ.cfts3-custom-originPath.js.snapshot/integ.json +12 -0
  74. package/test/integ.cfts3-custom-originPath.js.snapshot/manifest.json +209 -0
  75. package/test/integ.cfts3-custom-originPath.js.snapshot/tree.json +1117 -0
  76. package/test/integ.cfts3-customLoggingBuckets.js +6 -3
  77. package/test/integ.cfts3-customLoggingBuckets.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js +1 -0
  78. package/test/integ.cfts3-customLoggingBuckets.js.snapshot/cdk.out +1 -0
  79. package/test/integ.cfts3-customLoggingBuckets.js.snapshot/cfts3-customLoggingBuckets.assets.json +32 -0
  80. package/test/integ.cfts3-customLoggingBuckets.js.snapshot/cfts3-customLoggingBuckets.template.json +987 -0
  81. package/test/integ.cfts3-customLoggingBuckets.js.snapshot/cfts3customLoggingBucketsIntegDefaultTestDeployAssert4D171F9F.assets.json +19 -0
  82. package/test/integ.cfts3-customLoggingBuckets.js.snapshot/cfts3customLoggingBucketsIntegDefaultTestDeployAssert4D171F9F.template.json +36 -0
  83. package/test/integ.cfts3-customLoggingBuckets.js.snapshot/integ.json +12 -0
  84. package/test/integ.cfts3-customLoggingBuckets.js.snapshot/manifest.json +209 -0
  85. package/test/integ.cfts3-customLoggingBuckets.js.snapshot/tree.json +1156 -0
  86. package/test/integ.cfts3-existing-bucket.js +6 -3
  87. package/test/integ.cfts3-existing-bucket.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js +1 -0
  88. package/test/integ.cfts3-existing-bucket.js.snapshot/cdk.out +1 -0
  89. package/test/integ.cfts3-existing-bucket.js.snapshot/cfts3-existing-bucket.assets.json +32 -0
  90. package/test/integ.cfts3-existing-bucket.js.snapshot/cfts3-existing-bucket.template.json +1014 -0
  91. package/test/integ.cfts3-existing-bucket.js.snapshot/cfts3existingbucketIntegDefaultTestDeployAssertA6D4EB49.assets.json +19 -0
  92. package/test/integ.cfts3-existing-bucket.js.snapshot/cfts3existingbucketIntegDefaultTestDeployAssertA6D4EB49.template.json +36 -0
  93. package/test/integ.cfts3-existing-bucket.js.snapshot/integ.json +12 -0
  94. package/test/integ.cfts3-existing-bucket.js.snapshot/manifest.json +221 -0
  95. package/test/integ.cfts3-existing-bucket.js.snapshot/tree.json +1229 -0
  96. package/test/integ.cfts3-no-arguments.js +6 -3
  97. package/test/integ.cfts3-no-arguments.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js +1 -0
  98. package/test/integ.cfts3-no-arguments.js.snapshot/cdk.out +1 -0
  99. package/test/integ.cfts3-no-arguments.js.snapshot/cfts3-no-arguments.assets.json +32 -0
  100. package/test/integ.cfts3-no-arguments.js.snapshot/cfts3-no-arguments.template.json +959 -0
  101. package/test/integ.cfts3-no-arguments.js.snapshot/cfts3noargumentsIntegDefaultTestDeployAssertBA5AFA25.assets.json +19 -0
  102. package/test/integ.cfts3-no-arguments.js.snapshot/cfts3noargumentsIntegDefaultTestDeployAssertBA5AFA25.template.json +36 -0
  103. package/test/integ.cfts3-no-arguments.js.snapshot/integ.json +12 -0
  104. package/test/integ.cfts3-no-arguments.js.snapshot/manifest.json +209 -0
  105. package/test/integ.cfts3-no-arguments.js.snapshot/tree.json +1117 -0
  106. package/test/integ.cfts3-no-security-headers.js +6 -3
  107. package/test/integ.cfts3-no-security-headers.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js +1 -0
  108. package/test/integ.cfts3-no-security-headers.js.snapshot/cdk.out +1 -0
  109. package/test/integ.cfts3-no-security-headers.js.snapshot/cfts3-no-security-headers.assets.json +32 -0
  110. package/test/integ.cfts3-no-security-headers.js.snapshot/cfts3-no-security-headers.template.json +926 -0
  111. package/test/integ.cfts3-no-security-headers.js.snapshot/cfts3nosecurityheadersIntegDefaultTestDeployAssert38FE05BE.assets.json +19 -0
  112. package/test/integ.cfts3-no-security-headers.js.snapshot/cfts3nosecurityheadersIntegDefaultTestDeployAssert38FE05BE.template.json +36 -0
  113. package/test/integ.cfts3-no-security-headers.js.snapshot/integ.json +12 -0
  114. package/test/integ.cfts3-no-security-headers.js.snapshot/manifest.json +203 -0
  115. package/test/integ.cfts3-no-security-headers.js.snapshot/tree.json +1076 -0
  116. package/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.expected.json +0 -960
  117. package/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.expected.json +0 -594
  118. package/test/integ.cfts3-bucket-with-http-origin.expected.json +0 -559
  119. package/test/integ.cfts3-cmk-encryption.expected.json +0 -527
  120. package/test/integ.cfts3-cmk-provided-as-bucket-prop.expected.json +0 -960
  121. package/test/integ.cfts3-custom-headers.expected.json +0 -981
  122. package/test/integ.cfts3-custom-originPath.expected.json +0 -950
  123. package/test/integ.cfts3-customCloudFrontLoggingBucket.expected.json +0 -700
  124. package/test/integ.cfts3-customLoggingBuckets.expected.json +0 -987
  125. package/test/integ.cfts3-existing-bucket.expected.json +0 -1014
  126. package/test/integ.cfts3-no-arguments.expected.json +0 -959
  127. package/test/integ.cfts3-no-security-headers.expected.json +0 -926
@@ -1,950 +0,0 @@
1
- {
2
- "Description": "Integration Test for originPath with aws-cloudfront-s3",
3
- "Resources": {
4
- "testcloudfronts3S3LoggingBucket90D239DD": {
5
- "Type": "AWS::S3::Bucket",
6
- "Properties": {
7
- "BucketEncryption": {
8
- "ServerSideEncryptionConfiguration": [
9
- {
10
- "ServerSideEncryptionByDefault": {
11
- "SSEAlgorithm": "AES256"
12
- }
13
- }
14
- ]
15
- },
16
- "PublicAccessBlockConfiguration": {
17
- "BlockPublicAcls": true,
18
- "BlockPublicPolicy": true,
19
- "IgnorePublicAcls": true,
20
- "RestrictPublicBuckets": true
21
- },
22
- "Tags": [
23
- {
24
- "Key": "aws-cdk:auto-delete-objects",
25
- "Value": "true"
26
- }
27
- ],
28
- "VersioningConfiguration": {
29
- "Status": "Enabled"
30
- }
31
- },
32
- "UpdateReplacePolicy": "Delete",
33
- "DeletionPolicy": "Delete",
34
- "Metadata": {
35
- "cfn_nag": {
36
- "rules_to_suppress": [
37
- {
38
- "id": "W35",
39
- "reason": "This S3 bucket is used as the access logging bucket for another bucket"
40
- }
41
- ]
42
- }
43
- }
44
- },
45
- "testcloudfronts3S3LoggingBucketPolicy529D4CFF": {
46
- "Type": "AWS::S3::BucketPolicy",
47
- "Properties": {
48
- "Bucket": {
49
- "Ref": "testcloudfronts3S3LoggingBucket90D239DD"
50
- },
51
- "PolicyDocument": {
52
- "Statement": [
53
- {
54
- "Action": "s3:*",
55
- "Condition": {
56
- "Bool": {
57
- "aws:SecureTransport": "false"
58
- }
59
- },
60
- "Effect": "Deny",
61
- "Principal": {
62
- "AWS": "*"
63
- },
64
- "Resource": [
65
- {
66
- "Fn::GetAtt": [
67
- "testcloudfronts3S3LoggingBucket90D239DD",
68
- "Arn"
69
- ]
70
- },
71
- {
72
- "Fn::Join": [
73
- "",
74
- [
75
- {
76
- "Fn::GetAtt": [
77
- "testcloudfronts3S3LoggingBucket90D239DD",
78
- "Arn"
79
- ]
80
- },
81
- "/*"
82
- ]
83
- ]
84
- }
85
- ]
86
- },
87
- {
88
- "Action": [
89
- "s3:PutBucketPolicy",
90
- "s3:GetBucket*",
91
- "s3:List*",
92
- "s3:DeleteObject*"
93
- ],
94
- "Effect": "Allow",
95
- "Principal": {
96
- "AWS": {
97
- "Fn::GetAtt": [
98
- "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092",
99
- "Arn"
100
- ]
101
- }
102
- },
103
- "Resource": [
104
- {
105
- "Fn::GetAtt": [
106
- "testcloudfronts3S3LoggingBucket90D239DD",
107
- "Arn"
108
- ]
109
- },
110
- {
111
- "Fn::Join": [
112
- "",
113
- [
114
- {
115
- "Fn::GetAtt": [
116
- "testcloudfronts3S3LoggingBucket90D239DD",
117
- "Arn"
118
- ]
119
- },
120
- "/*"
121
- ]
122
- ]
123
- }
124
- ]
125
- },
126
- {
127
- "Action": "s3:PutObject",
128
- "Condition": {
129
- "ArnLike": {
130
- "aws:SourceArn": {
131
- "Fn::GetAtt": [
132
- "testcloudfronts3S3BucketE0C5F76E",
133
- "Arn"
134
- ]
135
- }
136
- },
137
- "StringEquals": {
138
- "aws:SourceAccount": {
139
- "Ref": "AWS::AccountId"
140
- }
141
- }
142
- },
143
- "Effect": "Allow",
144
- "Principal": {
145
- "Service": "logging.s3.amazonaws.com"
146
- },
147
- "Resource": {
148
- "Fn::Join": [
149
- "",
150
- [
151
- {
152
- "Fn::GetAtt": [
153
- "testcloudfronts3S3LoggingBucket90D239DD",
154
- "Arn"
155
- ]
156
- },
157
- "/*"
158
- ]
159
- ]
160
- }
161
- }
162
- ],
163
- "Version": "2012-10-17"
164
- }
165
- }
166
- },
167
- "testcloudfronts3S3LoggingBucketAutoDeleteObjectsCustomResource6EE37727": {
168
- "Type": "Custom::S3AutoDeleteObjects",
169
- "Properties": {
170
- "ServiceToken": {
171
- "Fn::GetAtt": [
172
- "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F",
173
- "Arn"
174
- ]
175
- },
176
- "BucketName": {
177
- "Ref": "testcloudfronts3S3LoggingBucket90D239DD"
178
- }
179
- },
180
- "DependsOn": [
181
- "testcloudfronts3S3LoggingBucketPolicy529D4CFF"
182
- ],
183
- "UpdateReplacePolicy": "Delete",
184
- "DeletionPolicy": "Delete"
185
- },
186
- "testcloudfronts3S3BucketE0C5F76E": {
187
- "Type": "AWS::S3::Bucket",
188
- "Properties": {
189
- "BucketEncryption": {
190
- "ServerSideEncryptionConfiguration": [
191
- {
192
- "ServerSideEncryptionByDefault": {
193
- "SSEAlgorithm": "AES256"
194
- }
195
- }
196
- ]
197
- },
198
- "LifecycleConfiguration": {
199
- "Rules": [
200
- {
201
- "NoncurrentVersionTransitions": [
202
- {
203
- "StorageClass": "GLACIER",
204
- "TransitionInDays": 90
205
- }
206
- ],
207
- "Status": "Enabled"
208
- }
209
- ]
210
- },
211
- "LoggingConfiguration": {
212
- "DestinationBucketName": {
213
- "Ref": "testcloudfronts3S3LoggingBucket90D239DD"
214
- }
215
- },
216
- "PublicAccessBlockConfiguration": {
217
- "BlockPublicAcls": true,
218
- "BlockPublicPolicy": true,
219
- "IgnorePublicAcls": true,
220
- "RestrictPublicBuckets": true
221
- },
222
- "Tags": [
223
- {
224
- "Key": "aws-cdk:auto-delete-objects",
225
- "Value": "true"
226
- }
227
- ],
228
- "VersioningConfiguration": {
229
- "Status": "Enabled"
230
- }
231
- },
232
- "UpdateReplacePolicy": "Delete",
233
- "DeletionPolicy": "Delete"
234
- },
235
- "testcloudfronts3S3BucketPolicy250F1F61": {
236
- "Type": "AWS::S3::BucketPolicy",
237
- "Properties": {
238
- "Bucket": {
239
- "Ref": "testcloudfronts3S3BucketE0C5F76E"
240
- },
241
- "PolicyDocument": {
242
- "Statement": [
243
- {
244
- "Action": "s3:*",
245
- "Condition": {
246
- "Bool": {
247
- "aws:SecureTransport": "false"
248
- }
249
- },
250
- "Effect": "Deny",
251
- "Principal": {
252
- "AWS": "*"
253
- },
254
- "Resource": [
255
- {
256
- "Fn::GetAtt": [
257
- "testcloudfronts3S3BucketE0C5F76E",
258
- "Arn"
259
- ]
260
- },
261
- {
262
- "Fn::Join": [
263
- "",
264
- [
265
- {
266
- "Fn::GetAtt": [
267
- "testcloudfronts3S3BucketE0C5F76E",
268
- "Arn"
269
- ]
270
- },
271
- "/*"
272
- ]
273
- ]
274
- }
275
- ]
276
- },
277
- {
278
- "Action": [
279
- "s3:PutBucketPolicy",
280
- "s3:GetBucket*",
281
- "s3:List*",
282
- "s3:DeleteObject*"
283
- ],
284
- "Effect": "Allow",
285
- "Principal": {
286
- "AWS": {
287
- "Fn::GetAtt": [
288
- "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092",
289
- "Arn"
290
- ]
291
- }
292
- },
293
- "Resource": [
294
- {
295
- "Fn::GetAtt": [
296
- "testcloudfronts3S3BucketE0C5F76E",
297
- "Arn"
298
- ]
299
- },
300
- {
301
- "Fn::Join": [
302
- "",
303
- [
304
- {
305
- "Fn::GetAtt": [
306
- "testcloudfronts3S3BucketE0C5F76E",
307
- "Arn"
308
- ]
309
- },
310
- "/*"
311
- ]
312
- ]
313
- }
314
- ]
315
- },
316
- {
317
- "Action": "s3:GetObject",
318
- "Condition": {
319
- "StringEquals": {
320
- "AWS:SourceArn": {
321
- "Fn::Join": [
322
- "",
323
- [
324
- "arn:aws:cloudfront::",
325
- {
326
- "Ref": "AWS::AccountId"
327
- },
328
- ":distribution/",
329
- {
330
- "Ref": "testcloudfronts3CloudFrontDistribution0565DEE8"
331
- }
332
- ]
333
- ]
334
- }
335
- }
336
- },
337
- "Effect": "Allow",
338
- "Principal": {
339
- "Service": "cloudfront.amazonaws.com"
340
- },
341
- "Resource": {
342
- "Fn::Join": [
343
- "",
344
- [
345
- {
346
- "Fn::GetAtt": [
347
- "testcloudfronts3S3BucketE0C5F76E",
348
- "Arn"
349
- ]
350
- },
351
- "/*"
352
- ]
353
- ]
354
- }
355
- }
356
- ],
357
- "Version": "2012-10-17"
358
- }
359
- },
360
- "Metadata": {
361
- "cfn_nag": {
362
- "rules_to_suppress": [
363
- {
364
- "id": "F16",
365
- "reason": "Public website bucket policy requires a wildcard principal"
366
- }
367
- ]
368
- }
369
- }
370
- },
371
- "testcloudfronts3S3BucketAutoDeleteObjectsCustomResourceA13DD8F7": {
372
- "Type": "Custom::S3AutoDeleteObjects",
373
- "Properties": {
374
- "ServiceToken": {
375
- "Fn::GetAtt": [
376
- "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F",
377
- "Arn"
378
- ]
379
- },
380
- "BucketName": {
381
- "Ref": "testcloudfronts3S3BucketE0C5F76E"
382
- }
383
- },
384
- "DependsOn": [
385
- "testcloudfronts3S3BucketPolicy250F1F61"
386
- ],
387
- "UpdateReplacePolicy": "Delete",
388
- "DeletionPolicy": "Delete"
389
- },
390
- "testcloudfronts3SetHttpSecurityHeaders6C5A1E69": {
391
- "Type": "AWS::CloudFront::Function",
392
- "Properties": {
393
- "AutoPublish": true,
394
- "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; }",
395
- "FunctionConfig": {
396
- "Comment": "SetHttpSecurityHeadersc8966f7b24c95d47868a69c8831fbd3ccac3fa3d70",
397
- "Runtime": "cloudfront-js-1.0"
398
- },
399
- "Name": "SetHttpSecurityHeadersc8966f7b24c95d47868a69c8831fbd3ccac3fa3d70"
400
- }
401
- },
402
- "testcloudfronts3CloudfrontLoggingBucketAccessLog2E738D58": {
403
- "Type": "AWS::S3::Bucket",
404
- "Properties": {
405
- "BucketEncryption": {
406
- "ServerSideEncryptionConfiguration": [
407
- {
408
- "ServerSideEncryptionByDefault": {
409
- "SSEAlgorithm": "AES256"
410
- }
411
- }
412
- ]
413
- },
414
- "OwnershipControls": {
415
- "Rules": [
416
- {
417
- "ObjectOwnership": "ObjectWriter"
418
- }
419
- ]
420
- },
421
- "PublicAccessBlockConfiguration": {
422
- "BlockPublicAcls": true,
423
- "BlockPublicPolicy": true,
424
- "IgnorePublicAcls": true,
425
- "RestrictPublicBuckets": true
426
- },
427
- "Tags": [
428
- {
429
- "Key": "aws-cdk:auto-delete-objects",
430
- "Value": "true"
431
- }
432
- ],
433
- "VersioningConfiguration": {
434
- "Status": "Enabled"
435
- }
436
- },
437
- "UpdateReplacePolicy": "Delete",
438
- "DeletionPolicy": "Delete",
439
- "Metadata": {
440
- "cfn_nag": {
441
- "rules_to_suppress": [
442
- {
443
- "id": "W35",
444
- "reason": "This S3 bucket is used as the access logging bucket for another bucket"
445
- }
446
- ]
447
- }
448
- }
449
- },
450
- "testcloudfronts3CloudfrontLoggingBucketAccessLogPolicy526F2E14": {
451
- "Type": "AWS::S3::BucketPolicy",
452
- "Properties": {
453
- "Bucket": {
454
- "Ref": "testcloudfronts3CloudfrontLoggingBucketAccessLog2E738D58"
455
- },
456
- "PolicyDocument": {
457
- "Statement": [
458
- {
459
- "Action": "s3:*",
460
- "Condition": {
461
- "Bool": {
462
- "aws:SecureTransport": "false"
463
- }
464
- },
465
- "Effect": "Deny",
466
- "Principal": {
467
- "AWS": "*"
468
- },
469
- "Resource": [
470
- {
471
- "Fn::GetAtt": [
472
- "testcloudfronts3CloudfrontLoggingBucketAccessLog2E738D58",
473
- "Arn"
474
- ]
475
- },
476
- {
477
- "Fn::Join": [
478
- "",
479
- [
480
- {
481
- "Fn::GetAtt": [
482
- "testcloudfronts3CloudfrontLoggingBucketAccessLog2E738D58",
483
- "Arn"
484
- ]
485
- },
486
- "/*"
487
- ]
488
- ]
489
- }
490
- ]
491
- },
492
- {
493
- "Action": [
494
- "s3:PutBucketPolicy",
495
- "s3:GetBucket*",
496
- "s3:List*",
497
- "s3:DeleteObject*"
498
- ],
499
- "Effect": "Allow",
500
- "Principal": {
501
- "AWS": {
502
- "Fn::GetAtt": [
503
- "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092",
504
- "Arn"
505
- ]
506
- }
507
- },
508
- "Resource": [
509
- {
510
- "Fn::GetAtt": [
511
- "testcloudfronts3CloudfrontLoggingBucketAccessLog2E738D58",
512
- "Arn"
513
- ]
514
- },
515
- {
516
- "Fn::Join": [
517
- "",
518
- [
519
- {
520
- "Fn::GetAtt": [
521
- "testcloudfronts3CloudfrontLoggingBucketAccessLog2E738D58",
522
- "Arn"
523
- ]
524
- },
525
- "/*"
526
- ]
527
- ]
528
- }
529
- ]
530
- },
531
- {
532
- "Action": "s3:PutObject",
533
- "Condition": {
534
- "ArnLike": {
535
- "aws:SourceArn": {
536
- "Fn::GetAtt": [
537
- "testcloudfronts3CloudfrontLoggingBucket985C0FE8",
538
- "Arn"
539
- ]
540
- }
541
- },
542
- "StringEquals": {
543
- "aws:SourceAccount": {
544
- "Ref": "AWS::AccountId"
545
- }
546
- }
547
- },
548
- "Effect": "Allow",
549
- "Principal": {
550
- "Service": "logging.s3.amazonaws.com"
551
- },
552
- "Resource": {
553
- "Fn::Join": [
554
- "",
555
- [
556
- {
557
- "Fn::GetAtt": [
558
- "testcloudfronts3CloudfrontLoggingBucketAccessLog2E738D58",
559
- "Arn"
560
- ]
561
- },
562
- "/*"
563
- ]
564
- ]
565
- }
566
- }
567
- ],
568
- "Version": "2012-10-17"
569
- }
570
- }
571
- },
572
- "testcloudfronts3CloudfrontLoggingBucketAccessLogAutoDeleteObjectsCustomResourceE16E063D": {
573
- "Type": "Custom::S3AutoDeleteObjects",
574
- "Properties": {
575
- "ServiceToken": {
576
- "Fn::GetAtt": [
577
- "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F",
578
- "Arn"
579
- ]
580
- },
581
- "BucketName": {
582
- "Ref": "testcloudfronts3CloudfrontLoggingBucketAccessLog2E738D58"
583
- }
584
- },
585
- "DependsOn": [
586
- "testcloudfronts3CloudfrontLoggingBucketAccessLogPolicy526F2E14"
587
- ],
588
- "UpdateReplacePolicy": "Delete",
589
- "DeletionPolicy": "Delete"
590
- },
591
- "testcloudfronts3CloudfrontLoggingBucket985C0FE8": {
592
- "Type": "AWS::S3::Bucket",
593
- "Properties": {
594
- "AccessControl": "LogDeliveryWrite",
595
- "BucketEncryption": {
596
- "ServerSideEncryptionConfiguration": [
597
- {
598
- "ServerSideEncryptionByDefault": {
599
- "SSEAlgorithm": "AES256"
600
- }
601
- }
602
- ]
603
- },
604
- "LoggingConfiguration": {
605
- "DestinationBucketName": {
606
- "Ref": "testcloudfronts3CloudfrontLoggingBucketAccessLog2E738D58"
607
- }
608
- },
609
- "OwnershipControls": {
610
- "Rules": [
611
- {
612
- "ObjectOwnership": "ObjectWriter"
613
- }
614
- ]
615
- },
616
- "PublicAccessBlockConfiguration": {
617
- "BlockPublicAcls": true,
618
- "BlockPublicPolicy": true,
619
- "IgnorePublicAcls": true,
620
- "RestrictPublicBuckets": true
621
- },
622
- "Tags": [
623
- {
624
- "Key": "aws-cdk:auto-delete-objects",
625
- "Value": "true"
626
- }
627
- ],
628
- "VersioningConfiguration": {
629
- "Status": "Enabled"
630
- }
631
- },
632
- "UpdateReplacePolicy": "Delete",
633
- "DeletionPolicy": "Delete"
634
- },
635
- "testcloudfronts3CloudfrontLoggingBucketPolicyDF55851B": {
636
- "Type": "AWS::S3::BucketPolicy",
637
- "Properties": {
638
- "Bucket": {
639
- "Ref": "testcloudfronts3CloudfrontLoggingBucket985C0FE8"
640
- },
641
- "PolicyDocument": {
642
- "Statement": [
643
- {
644
- "Action": "s3:*",
645
- "Condition": {
646
- "Bool": {
647
- "aws:SecureTransport": "false"
648
- }
649
- },
650
- "Effect": "Deny",
651
- "Principal": {
652
- "AWS": "*"
653
- },
654
- "Resource": [
655
- {
656
- "Fn::GetAtt": [
657
- "testcloudfronts3CloudfrontLoggingBucket985C0FE8",
658
- "Arn"
659
- ]
660
- },
661
- {
662
- "Fn::Join": [
663
- "",
664
- [
665
- {
666
- "Fn::GetAtt": [
667
- "testcloudfronts3CloudfrontLoggingBucket985C0FE8",
668
- "Arn"
669
- ]
670
- },
671
- "/*"
672
- ]
673
- ]
674
- }
675
- ]
676
- },
677
- {
678
- "Action": [
679
- "s3:PutBucketPolicy",
680
- "s3:GetBucket*",
681
- "s3:List*",
682
- "s3:DeleteObject*"
683
- ],
684
- "Effect": "Allow",
685
- "Principal": {
686
- "AWS": {
687
- "Fn::GetAtt": [
688
- "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092",
689
- "Arn"
690
- ]
691
- }
692
- },
693
- "Resource": [
694
- {
695
- "Fn::GetAtt": [
696
- "testcloudfronts3CloudfrontLoggingBucket985C0FE8",
697
- "Arn"
698
- ]
699
- },
700
- {
701
- "Fn::Join": [
702
- "",
703
- [
704
- {
705
- "Fn::GetAtt": [
706
- "testcloudfronts3CloudfrontLoggingBucket985C0FE8",
707
- "Arn"
708
- ]
709
- },
710
- "/*"
711
- ]
712
- ]
713
- }
714
- ]
715
- }
716
- ],
717
- "Version": "2012-10-17"
718
- }
719
- }
720
- },
721
- "testcloudfronts3CloudfrontLoggingBucketAutoDeleteObjectsCustomResource19604D88": {
722
- "Type": "Custom::S3AutoDeleteObjects",
723
- "Properties": {
724
- "ServiceToken": {
725
- "Fn::GetAtt": [
726
- "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F",
727
- "Arn"
728
- ]
729
- },
730
- "BucketName": {
731
- "Ref": "testcloudfronts3CloudfrontLoggingBucket985C0FE8"
732
- }
733
- },
734
- "DependsOn": [
735
- "testcloudfronts3CloudfrontLoggingBucketPolicyDF55851B"
736
- ],
737
- "UpdateReplacePolicy": "Delete",
738
- "DeletionPolicy": "Delete"
739
- },
740
- "testcloudfronts3CloudFrontOac7A951AA6": {
741
- "Type": "AWS::CloudFront::OriginAccessControl",
742
- "Properties": {
743
- "OriginAccessControlConfig": {
744
- "Description": "Origin access control provisioned by aws-cloudfront-s3",
745
- "Name": {
746
- "Fn::Join": [
747
- "",
748
- [
749
- "aws-cloudfront-s3-testnt-s3-",
750
- {
751
- "Fn::Select": [
752
- 2,
753
- {
754
- "Fn::Split": [
755
- "/",
756
- {
757
- "Ref": "AWS::StackId"
758
- }
759
- ]
760
- }
761
- ]
762
- }
763
- ]
764
- ]
765
- },
766
- "OriginAccessControlOriginType": "s3",
767
- "SigningBehavior": "always",
768
- "SigningProtocol": "sigv4"
769
- }
770
- }
771
- },
772
- "testcloudfronts3CloudFrontDistribution0565DEE8": {
773
- "Type": "AWS::CloudFront::Distribution",
774
- "Properties": {
775
- "DistributionConfig": {
776
- "DefaultCacheBehavior": {
777
- "CachePolicyId": "658327ea-f89d-4fab-a63d-7e88639e58f6",
778
- "Compress": true,
779
- "FunctionAssociations": [
780
- {
781
- "EventType": "viewer-response",
782
- "FunctionARN": {
783
- "Fn::GetAtt": [
784
- "testcloudfronts3SetHttpSecurityHeaders6C5A1E69",
785
- "FunctionARN"
786
- ]
787
- }
788
- }
789
- ],
790
- "TargetOriginId": "cfts3customoriginPathtestcloudfronts3CloudFrontDistributionOrigin1AE2DDD7C",
791
- "ViewerProtocolPolicy": "redirect-to-https"
792
- },
793
- "DefaultRootObject": "index.html",
794
- "Enabled": true,
795
- "HttpVersion": "http2",
796
- "IPV6Enabled": true,
797
- "Logging": {
798
- "Bucket": {
799
- "Fn::GetAtt": [
800
- "testcloudfronts3CloudfrontLoggingBucket985C0FE8",
801
- "RegionalDomainName"
802
- ]
803
- }
804
- },
805
- "Origins": [
806
- {
807
- "DomainName": {
808
- "Fn::GetAtt": [
809
- "testcloudfronts3S3BucketE0C5F76E",
810
- "RegionalDomainName"
811
- ]
812
- },
813
- "Id": "cfts3customoriginPathtestcloudfronts3CloudFrontDistributionOrigin1AE2DDD7C",
814
- "OriginAccessControlId": {
815
- "Fn::GetAtt": [
816
- "testcloudfronts3CloudFrontOac7A951AA6",
817
- "Id"
818
- ]
819
- },
820
- "OriginPath": "/testPath",
821
- "S3OriginConfig": {
822
- "OriginAccessIdentity": ""
823
- }
824
- }
825
- ]
826
- }
827
- },
828
- "Metadata": {
829
- "cfn_nag": {
830
- "rules_to_suppress": [
831
- {
832
- "id": "W70",
833
- "reason": "Since the distribution uses the CloudFront domain name, CloudFront automatically sets the security policy to TLSv1 regardless of the value of MinimumProtocolVersion"
834
- }
835
- ]
836
- }
837
- }
838
- },
839
- "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092": {
840
- "Type": "AWS::IAM::Role",
841
- "Properties": {
842
- "AssumeRolePolicyDocument": {
843
- "Version": "2012-10-17",
844
- "Statement": [
845
- {
846
- "Action": "sts:AssumeRole",
847
- "Effect": "Allow",
848
- "Principal": {
849
- "Service": "lambda.amazonaws.com"
850
- }
851
- }
852
- ]
853
- },
854
- "ManagedPolicyArns": [
855
- {
856
- "Fn::Sub": "arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
857
- }
858
- ]
859
- }
860
- },
861
- "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F": {
862
- "Type": "AWS::Lambda::Function",
863
- "Properties": {
864
- "Code": {
865
- "S3Bucket": {
866
- "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
867
- },
868
- "S3Key": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip"
869
- },
870
- "Timeout": 900,
871
- "MemorySize": 128,
872
- "Handler": "index.handler",
873
- "Role": {
874
- "Fn::GetAtt": [
875
- "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092",
876
- "Arn"
877
- ]
878
- },
879
- "Runtime": "nodejs18.x",
880
- "Description": {
881
- "Fn::Join": [
882
- "",
883
- [
884
- "Lambda function for auto-deleting objects in ",
885
- {
886
- "Ref": "testcloudfronts3S3LoggingBucket90D239DD"
887
- },
888
- " S3 bucket."
889
- ]
890
- ]
891
- }
892
- },
893
- "DependsOn": [
894
- "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092"
895
- ],
896
- "Metadata": {
897
- "cfn_nag": {
898
- "rules_to_suppress": [
899
- {
900
- "id": "W58",
901
- "reason": "CDK generated custom resource"
902
- },
903
- {
904
- "id": "W89",
905
- "reason": "CDK generated custom resource"
906
- },
907
- {
908
- "id": "W92",
909
- "reason": "CDK generated custom resource"
910
- }
911
- ]
912
- }
913
- }
914
- }
915
- },
916
- "Parameters": {
917
- "BootstrapVersion": {
918
- "Type": "AWS::SSM::Parameter::Value<String>",
919
- "Default": "/cdk-bootstrap/hnb659fds/version",
920
- "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
921
- }
922
- },
923
- "Rules": {
924
- "CheckBootstrapVersion": {
925
- "Assertions": [
926
- {
927
- "Assert": {
928
- "Fn::Not": [
929
- {
930
- "Fn::Contains": [
931
- [
932
- "1",
933
- "2",
934
- "3",
935
- "4",
936
- "5"
937
- ],
938
- {
939
- "Ref": "BootstrapVersion"
940
- }
941
- ]
942
- }
943
- ]
944
- },
945
- "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
946
- }
947
- ]
948
- }
949
- }
950
- }