@aws-solutions-constructs/resources 2.56.0 → 2.58.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 +46 -7
- package/lib/key-policy-updater.d.ts +1 -1
- package/lib/key-policy-updater.js +13 -18
- package/lib/template-writer.js +16 -37
- package/package.json +6 -6
- package/test/integ.key-policy-updater.d.ts +13 -0
- package/test/integ.key-policy-updater.js +65 -0
- package/test/integ.key-policy-updater.js.snapshot/asset.4a4b024f310aca2784b69bcb790e9ccaef785e9ad5d1b73624144f88c4465b4f/index.d.ts +30 -0
- package/test/integ.key-policy-updater.js.snapshot/asset.4a4b024f310aca2784b69bcb790e9ccaef785e9ad5d1b73624144f88c4465b4f/index.js +127 -0
- package/test/integ.key-policy-updater.js.snapshot/cdk.out +1 -0
- package/test/integ.key-policy-updater.js.snapshot/integ.json +12 -0
- package/test/integ.key-policy-updater.js.snapshot/key-policy-updater.assets.json +45 -0
- package/test/integ.key-policy-updater.js.snapshot/key-policy-updater.template.json +518 -0
- package/test/integ.key-policy-updater.js.snapshot/keypolicyupdaterIntegDefaultTestDeployAssert2855331B.assets.json +19 -0
- package/test/integ.key-policy-updater.js.snapshot/keypolicyupdaterIntegDefaultTestDeployAssert2855331B.template.json +36 -0
- package/test/integ.key-policy-updater.js.snapshot/manifest.json +185 -0
- package/test/integ.key-policy-updater.js.snapshot/tree.json +795 -0
- package/test/integ.template-writer-from-asset.js.snapshot/manifest.json +27 -9
- package/test/integ.template-writer-from-asset.js.snapshot/template-writer-from-asset.assets.json +5 -5
- package/test/integ.template-writer-from-asset.js.snapshot/template-writer-from-asset.template.json +65 -121
- package/test/integ.template-writer-from-asset.js.snapshot/tree.json +128 -192
- package/test/integ.template-writer-from-large-asset.js.snapshot/manifest.json +27 -9
- package/test/integ.template-writer-from-large-asset.js.snapshot/template-writer-from-large-asset.assets.json +5 -5
- package/test/integ.template-writer-from-large-asset.js.snapshot/template-writer-from-large-asset.template.json +65 -121
- package/test/integ.template-writer-from-large-asset.js.snapshot/tree.json +128 -192
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"validateOnSynth": false,
|
|
67
67
|
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}",
|
|
68
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}/
|
|
69
|
+
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/ad36c8422cae204abec0f32ee441c05137398731aabd30caa3daef2c8dbef386.json",
|
|
70
70
|
"requiresBootstrapStackVersion": 6,
|
|
71
71
|
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
|
|
72
72
|
"additionalDependencies": [
|
|
@@ -82,28 +82,28 @@
|
|
|
82
82
|
"template-writer-from-asset.assets"
|
|
83
83
|
],
|
|
84
84
|
"metadata": {
|
|
85
|
-
"/template-writer-from-asset/
|
|
85
|
+
"/template-writer-from-asset/LambdaFunctionServiceRole/Resource": [
|
|
86
86
|
{
|
|
87
87
|
"type": "aws:cdk:logicalId",
|
|
88
|
-
"data": "
|
|
88
|
+
"data": "LambdaFunctionServiceRole0C4CDE0B"
|
|
89
89
|
}
|
|
90
90
|
],
|
|
91
|
-
"/template-writer-from-asset/
|
|
91
|
+
"/template-writer-from-asset/LambdaFunctionServiceRole/DefaultPolicy/Resource": [
|
|
92
92
|
{
|
|
93
93
|
"type": "aws:cdk:logicalId",
|
|
94
|
-
"data": "
|
|
94
|
+
"data": "LambdaFunctionServiceRoleDefaultPolicy126C8897"
|
|
95
95
|
}
|
|
96
96
|
],
|
|
97
|
-
"/template-writer-from-asset/
|
|
97
|
+
"/template-writer-from-asset/LambdaFunction/Resource": [
|
|
98
98
|
{
|
|
99
99
|
"type": "aws:cdk:logicalId",
|
|
100
|
-
"data": "
|
|
100
|
+
"data": "LambdaFunctionBF21E41F"
|
|
101
101
|
}
|
|
102
102
|
],
|
|
103
|
-
"/template-writer-from-asset/
|
|
103
|
+
"/template-writer-from-asset/TestTemplateWriterPolicy/Resource": [
|
|
104
104
|
{
|
|
105
105
|
"type": "aws:cdk:logicalId",
|
|
106
|
-
"data": "
|
|
106
|
+
"data": "TestTemplateWriterPolicy8177DE02"
|
|
107
107
|
}
|
|
108
108
|
],
|
|
109
109
|
"/template-writer-from-asset/TestTemplateWriterProvider/framework-onEvent/ServiceRole/Resource": [
|
|
@@ -141,6 +141,24 @@
|
|
|
141
141
|
"type": "aws:cdk:logicalId",
|
|
142
142
|
"data": "CheckBootstrapVersion"
|
|
143
143
|
}
|
|
144
|
+
],
|
|
145
|
+
"TestTemplateWriterLambdaRole192FE23A": [
|
|
146
|
+
{
|
|
147
|
+
"type": "aws:cdk:logicalId",
|
|
148
|
+
"data": "TestTemplateWriterLambdaRole192FE23A",
|
|
149
|
+
"trace": [
|
|
150
|
+
"!!DESTRUCTIVE_CHANGES: WILL_DESTROY"
|
|
151
|
+
]
|
|
152
|
+
}
|
|
153
|
+
],
|
|
154
|
+
"TestTemplateWriterLambdaRoleDefaultPolicyBCFD88FC": [
|
|
155
|
+
{
|
|
156
|
+
"type": "aws:cdk:logicalId",
|
|
157
|
+
"data": "TestTemplateWriterLambdaRoleDefaultPolicyBCFD88FC",
|
|
158
|
+
"trace": [
|
|
159
|
+
"!!DESTRUCTIVE_CHANGES: WILL_DESTROY"
|
|
160
|
+
]
|
|
161
|
+
}
|
|
144
162
|
]
|
|
145
163
|
},
|
|
146
164
|
"displayName": "template-writer-from-asset"
|
package/test/integ.template-writer-from-asset.js.snapshot/template-writer-from-asset.assets.json
CHANGED
|
@@ -40,20 +40,20 @@
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
|
-
"
|
|
43
|
+
"3542be390685e0c8353d92ccb5796d343cd93ca946b6b0de798004206a199adc": {
|
|
44
44
|
"source": {
|
|
45
|
-
"path": "asset.
|
|
45
|
+
"path": "asset.3542be390685e0c8353d92ccb5796d343cd93ca946b6b0de798004206a199adc",
|
|
46
46
|
"packaging": "zip"
|
|
47
47
|
},
|
|
48
48
|
"destinations": {
|
|
49
49
|
"current_account-current_region": {
|
|
50
50
|
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
|
|
51
|
-
"objectKey": "
|
|
51
|
+
"objectKey": "3542be390685e0c8353d92ccb5796d343cd93ca946b6b0de798004206a199adc.zip",
|
|
52
52
|
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
|
-
"
|
|
56
|
+
"ad36c8422cae204abec0f32ee441c05137398731aabd30caa3daef2c8dbef386": {
|
|
57
57
|
"source": {
|
|
58
58
|
"path": "template-writer-from-asset.template.json",
|
|
59
59
|
"packaging": "file"
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"destinations": {
|
|
62
62
|
"current_account-current_region": {
|
|
63
63
|
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
|
|
64
|
-
"objectKey": "
|
|
64
|
+
"objectKey": "ad36c8422cae204abec0f32ee441c05137398731aabd30caa3daef2c8dbef386.json",
|
|
65
65
|
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
|
|
66
66
|
}
|
|
67
67
|
}
|
package/test/integ.template-writer-from-asset.js.snapshot/template-writer-from-asset.template.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"Description": "Integration Test for Template Writer Resource",
|
|
3
3
|
"Resources": {
|
|
4
|
-
"
|
|
4
|
+
"LambdaFunctionServiceRole0C4CDE0B": {
|
|
5
5
|
"Type": "AWS::IAM::Role",
|
|
6
6
|
"Properties": {
|
|
7
7
|
"AssumeRolePolicyDocument": {
|
|
@@ -16,7 +16,6 @@
|
|
|
16
16
|
],
|
|
17
17
|
"Version": "2012-10-17"
|
|
18
18
|
},
|
|
19
|
-
"Description": "Role used by the TemplateWriterLambda to transform the incoming asset",
|
|
20
19
|
"Policies": [
|
|
21
20
|
{
|
|
22
21
|
"PolicyDocument": {
|
|
@@ -52,68 +51,12 @@
|
|
|
52
51
|
],
|
|
53
52
|
"Version": "2012-10-17"
|
|
54
53
|
},
|
|
55
|
-
"PolicyName": "
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
"PolicyDocument": {
|
|
59
|
-
"Statement": [
|
|
60
|
-
{
|
|
61
|
-
"Action": "s3:GetObject",
|
|
62
|
-
"Effect": "Allow",
|
|
63
|
-
"Resource": {
|
|
64
|
-
"Fn::Join": [
|
|
65
|
-
"",
|
|
66
|
-
[
|
|
67
|
-
"arn:",
|
|
68
|
-
{
|
|
69
|
-
"Ref": "AWS::Partition"
|
|
70
|
-
},
|
|
71
|
-
":s3:::",
|
|
72
|
-
{
|
|
73
|
-
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
|
|
74
|
-
},
|
|
75
|
-
"/97cd237b0ae069fe0711bcc6a711e213fdaf0956421de5b964de9ccd0d2b23a1.97cd237b0ae069fe0711bcc6a711e213fdaf0956421de5b964de9ccd0d2b23a1"
|
|
76
|
-
]
|
|
77
|
-
]
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
],
|
|
81
|
-
"Version": "2012-10-17"
|
|
82
|
-
},
|
|
83
|
-
"PolicyName": "ReadInputAssetPolicy"
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
"PolicyDocument": {
|
|
87
|
-
"Statement": [
|
|
88
|
-
{
|
|
89
|
-
"Action": "s3:PutObject",
|
|
90
|
-
"Effect": "Allow",
|
|
91
|
-
"Resource": {
|
|
92
|
-
"Fn::Join": [
|
|
93
|
-
"",
|
|
94
|
-
[
|
|
95
|
-
"arn:",
|
|
96
|
-
{
|
|
97
|
-
"Ref": "AWS::Partition"
|
|
98
|
-
},
|
|
99
|
-
":s3:::",
|
|
100
|
-
{
|
|
101
|
-
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
|
|
102
|
-
},
|
|
103
|
-
"/*"
|
|
104
|
-
]
|
|
105
|
-
]
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
],
|
|
109
|
-
"Version": "2012-10-17"
|
|
110
|
-
},
|
|
111
|
-
"PolicyName": "WriteOutputAssetPolicy"
|
|
54
|
+
"PolicyName": "LambdaFunctionServiceRolePolicy"
|
|
112
55
|
}
|
|
113
56
|
]
|
|
114
57
|
}
|
|
115
58
|
},
|
|
116
|
-
"
|
|
59
|
+
"LambdaFunctionServiceRoleDefaultPolicy126C8897": {
|
|
117
60
|
"Type": "AWS::IAM::Policy",
|
|
118
61
|
"Properties": {
|
|
119
62
|
"PolicyDocument": {
|
|
@@ -129,10 +72,10 @@
|
|
|
129
72
|
],
|
|
130
73
|
"Version": "2012-10-17"
|
|
131
74
|
},
|
|
132
|
-
"PolicyName": "
|
|
75
|
+
"PolicyName": "LambdaFunctionServiceRoleDefaultPolicy126C8897",
|
|
133
76
|
"Roles": [
|
|
134
77
|
{
|
|
135
|
-
"Ref": "
|
|
78
|
+
"Ref": "LambdaFunctionServiceRole0C4CDE0B"
|
|
136
79
|
}
|
|
137
80
|
]
|
|
138
81
|
},
|
|
@@ -147,61 +90,6 @@
|
|
|
147
90
|
}
|
|
148
91
|
}
|
|
149
92
|
},
|
|
150
|
-
"LambdaFunctionServiceRole0C4CDE0B": {
|
|
151
|
-
"Type": "AWS::IAM::Role",
|
|
152
|
-
"Properties": {
|
|
153
|
-
"AssumeRolePolicyDocument": {
|
|
154
|
-
"Statement": [
|
|
155
|
-
{
|
|
156
|
-
"Action": "sts:AssumeRole",
|
|
157
|
-
"Effect": "Allow",
|
|
158
|
-
"Principal": {
|
|
159
|
-
"Service": "lambda.amazonaws.com"
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
],
|
|
163
|
-
"Version": "2012-10-17"
|
|
164
|
-
},
|
|
165
|
-
"Policies": [
|
|
166
|
-
{
|
|
167
|
-
"PolicyDocument": {
|
|
168
|
-
"Statement": [
|
|
169
|
-
{
|
|
170
|
-
"Action": [
|
|
171
|
-
"logs:CreateLogGroup",
|
|
172
|
-
"logs:CreateLogStream",
|
|
173
|
-
"logs:PutLogEvents"
|
|
174
|
-
],
|
|
175
|
-
"Effect": "Allow",
|
|
176
|
-
"Resource": {
|
|
177
|
-
"Fn::Join": [
|
|
178
|
-
"",
|
|
179
|
-
[
|
|
180
|
-
"arn:",
|
|
181
|
-
{
|
|
182
|
-
"Ref": "AWS::Partition"
|
|
183
|
-
},
|
|
184
|
-
":logs:",
|
|
185
|
-
{
|
|
186
|
-
"Ref": "AWS::Region"
|
|
187
|
-
},
|
|
188
|
-
":",
|
|
189
|
-
{
|
|
190
|
-
"Ref": "AWS::AccountId"
|
|
191
|
-
},
|
|
192
|
-
":log-group:/aws/lambda/*"
|
|
193
|
-
]
|
|
194
|
-
]
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
],
|
|
198
|
-
"Version": "2012-10-17"
|
|
199
|
-
},
|
|
200
|
-
"PolicyName": "LambdaFunctionServiceRolePolicy"
|
|
201
|
-
}
|
|
202
|
-
]
|
|
203
|
-
}
|
|
204
|
-
},
|
|
205
93
|
"LambdaFunctionBF21E41F": {
|
|
206
94
|
"Type": "AWS::Lambda::Function",
|
|
207
95
|
"Properties": {
|
|
@@ -214,7 +102,7 @@
|
|
|
214
102
|
"Handler": "index.handler",
|
|
215
103
|
"Role": {
|
|
216
104
|
"Fn::GetAtt": [
|
|
217
|
-
"
|
|
105
|
+
"LambdaFunctionServiceRole0C4CDE0B",
|
|
218
106
|
"Arn"
|
|
219
107
|
]
|
|
220
108
|
},
|
|
@@ -224,8 +112,8 @@
|
|
|
224
112
|
}
|
|
225
113
|
},
|
|
226
114
|
"DependsOn": [
|
|
227
|
-
"
|
|
228
|
-
"
|
|
115
|
+
"LambdaFunctionServiceRoleDefaultPolicy126C8897",
|
|
116
|
+
"LambdaFunctionServiceRole0C4CDE0B"
|
|
229
117
|
],
|
|
230
118
|
"Metadata": {
|
|
231
119
|
"cfn_nag": {
|
|
@@ -246,6 +134,62 @@
|
|
|
246
134
|
}
|
|
247
135
|
}
|
|
248
136
|
},
|
|
137
|
+
"TestTemplateWriterPolicy8177DE02": {
|
|
138
|
+
"Type": "AWS::IAM::Policy",
|
|
139
|
+
"Properties": {
|
|
140
|
+
"PolicyDocument": {
|
|
141
|
+
"Statement": [
|
|
142
|
+
{
|
|
143
|
+
"Action": "s3:GetObject",
|
|
144
|
+
"Effect": "Allow",
|
|
145
|
+
"Resource": {
|
|
146
|
+
"Fn::Join": [
|
|
147
|
+
"",
|
|
148
|
+
[
|
|
149
|
+
"arn:",
|
|
150
|
+
{
|
|
151
|
+
"Ref": "AWS::Partition"
|
|
152
|
+
},
|
|
153
|
+
":s3:::",
|
|
154
|
+
{
|
|
155
|
+
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
|
|
156
|
+
},
|
|
157
|
+
"/97cd237b0ae069fe0711bcc6a711e213fdaf0956421de5b964de9ccd0d2b23a1.97cd237b0ae069fe0711bcc6a711e213fdaf0956421de5b964de9ccd0d2b23a1"
|
|
158
|
+
]
|
|
159
|
+
]
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"Action": "s3:PutObject",
|
|
164
|
+
"Effect": "Allow",
|
|
165
|
+
"Resource": {
|
|
166
|
+
"Fn::Join": [
|
|
167
|
+
"",
|
|
168
|
+
[
|
|
169
|
+
"arn:",
|
|
170
|
+
{
|
|
171
|
+
"Ref": "AWS::Partition"
|
|
172
|
+
},
|
|
173
|
+
":s3:::",
|
|
174
|
+
{
|
|
175
|
+
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
|
|
176
|
+
},
|
|
177
|
+
"/*"
|
|
178
|
+
]
|
|
179
|
+
]
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
],
|
|
183
|
+
"Version": "2012-10-17"
|
|
184
|
+
},
|
|
185
|
+
"PolicyName": "TestTemplateWriterPolicy8177DE02",
|
|
186
|
+
"Roles": [
|
|
187
|
+
{
|
|
188
|
+
"Ref": "LambdaFunctionServiceRole0C4CDE0B"
|
|
189
|
+
}
|
|
190
|
+
]
|
|
191
|
+
}
|
|
192
|
+
},
|
|
249
193
|
"TestTemplateWriterProviderframeworkonEventServiceRoleED11CF9A": {
|
|
250
194
|
"Type": "AWS::IAM::Role",
|
|
251
195
|
"Properties": {
|
|
@@ -326,7 +270,7 @@
|
|
|
326
270
|
"S3Bucket": {
|
|
327
271
|
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
|
|
328
272
|
},
|
|
329
|
-
"S3Key": "
|
|
273
|
+
"S3Key": "3542be390685e0c8353d92ccb5796d343cd93ca946b6b0de798004206a199adc.zip"
|
|
330
274
|
},
|
|
331
275
|
"Description": "AWS CDK resource provider framework - onEvent (template-writer-from-asset/TestTemplateWriterProvider)",
|
|
332
276
|
"Environment": {
|