@aws-solutions-constructs/aws-apigateway-lambda 2.80.0 → 2.82.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 (24) hide show
  1. package/.jsii +43 -4
  2. package/lib/index.js +1 -1
  3. package/package.json +6 -6
  4. package/test/integ.apilam-deployFunction.js.snapshot/apilam-deployFunction.assets.json +3 -3
  5. package/test/integ.apilam-deployFunction.js.snapshot/apilam-deployFunction.template.json +24 -35
  6. package/test/integ.apilam-deployFunction.js.snapshot/apilamdeployFunctionIntegDefaultTestDeployAssert281C111D.assets.json +1 -1
  7. package/test/integ.apilam-deployFunction.js.snapshot/cdk.out +1 -1
  8. package/test/integ.apilam-deployFunction.js.snapshot/integ.json +1 -1
  9. package/test/integ.apilam-deployFunction.js.snapshot/manifest.json +290 -6
  10. package/test/integ.apilam-deployFunction.js.snapshot/tree.json +1 -927
  11. package/test/integ.apilam-existingFunction.js.snapshot/apilam-existingFunction.assets.json +3 -3
  12. package/test/integ.apilam-existingFunction.js.snapshot/apilam-existingFunction.template.json +24 -35
  13. package/test/integ.apilam-existingFunction.js.snapshot/apilamexistingFunctionIntegDefaultTestDeployAssert4238FD03.assets.json +1 -1
  14. package/test/integ.apilam-existingFunction.js.snapshot/cdk.out +1 -1
  15. package/test/integ.apilam-existingFunction.js.snapshot/integ.json +1 -1
  16. package/test/integ.apilam-existingFunction.js.snapshot/manifest.json +290 -6
  17. package/test/integ.apilam-existingFunction.js.snapshot/tree.json +1 -927
  18. package/test/integ.apilam-no-usage-plan.js.snapshot/apilam-no-usage-plan.assets.json +3 -3
  19. package/test/integ.apilam-no-usage-plan.js.snapshot/apilam-no-usage-plan.template.json +24 -35
  20. package/test/integ.apilam-no-usage-plan.js.snapshot/apilamnousageplanIntegDefaultTestDeployAssertFA088EA5.assets.json +1 -1
  21. package/test/integ.apilam-no-usage-plan.js.snapshot/cdk.out +1 -1
  22. package/test/integ.apilam-no-usage-plan.js.snapshot/integ.json +1 -1
  23. package/test/integ.apilam-no-usage-plan.js.snapshot/manifest.json +44 -41
  24. package/test/integ.apilam-no-usage-plan.js.snapshot/tree.json +1 -1078
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "36.0.0",
2
+ "version": "40.0.0",
3
3
  "files": {
4
4
  "0904d3723480fed2daf7885caa427b930881caae6879d1e6b0d395020173ef6f": {
5
5
  "source": {
@@ -14,7 +14,7 @@
14
14
  }
15
15
  }
16
16
  },
17
- "bc3fbfc5711a9e2d22bf42895b4d794f89e0d36e5045bcf3e257ceda41002e7d": {
17
+ "304db3f168db56fbcd5b166040ab5da1df6e246d69ed7c294c02bd3b6f31d8a5": {
18
18
  "source": {
19
19
  "path": "apilam-existingFunction.template.json",
20
20
  "packaging": "file"
@@ -22,7 +22,7 @@
22
22
  "destinations": {
23
23
  "current_account-current_region": {
24
24
  "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
25
- "objectKey": "bc3fbfc5711a9e2d22bf42895b4d794f89e0d36e5045bcf3e257ceda41002e7d.json",
25
+ "objectKey": "304db3f168db56fbcd5b166040ab5da1df6e246d69ed7c294c02bd3b6f31d8a5.json",
26
26
  "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
27
27
  }
28
28
  }
@@ -63,40 +63,6 @@
63
63
  }
64
64
  }
65
65
  },
66
- "LambdaFunctionServiceRoleDefaultPolicy126C8897": {
67
- "Type": "AWS::IAM::Policy",
68
- "Properties": {
69
- "PolicyDocument": {
70
- "Statement": [
71
- {
72
- "Action": [
73
- "xray:PutTelemetryRecords",
74
- "xray:PutTraceSegments"
75
- ],
76
- "Effect": "Allow",
77
- "Resource": "*"
78
- }
79
- ],
80
- "Version": "2012-10-17"
81
- },
82
- "PolicyName": "LambdaFunctionServiceRoleDefaultPolicy126C8897",
83
- "Roles": [
84
- {
85
- "Ref": "LambdaFunctionServiceRole0C4CDE0B"
86
- }
87
- ]
88
- },
89
- "Metadata": {
90
- "cfn_nag": {
91
- "rules_to_suppress": [
92
- {
93
- "id": "W12",
94
- "reason": "Lambda needs the following minimum required permissions to send trace data to X-Ray and access ENIs in a VPC."
95
- }
96
- ]
97
- }
98
- }
99
- },
100
66
  "LambdaFunctionBF21E41F": {
101
67
  "Type": "AWS::Lambda::Function",
102
68
  "Properties": {
@@ -124,7 +90,6 @@
124
90
  }
125
91
  },
126
92
  "DependsOn": [
127
- "LambdaFunctionServiceRoleDefaultPolicy126C8897",
128
93
  "LambdaFunctionServiceRole0C4CDE0B"
129
94
  ],
130
95
  "Metadata": {
@@ -146,6 +111,30 @@
146
111
  }
147
112
  }
148
113
  },
114
+ "LambdaFunctioninlinePolicyAddedToExecutionRole007875684": {
115
+ "Type": "AWS::IAM::Policy",
116
+ "Properties": {
117
+ "PolicyDocument": {
118
+ "Statement": [
119
+ {
120
+ "Action": [
121
+ "xray:PutTelemetryRecords",
122
+ "xray:PutTraceSegments"
123
+ ],
124
+ "Effect": "Allow",
125
+ "Resource": "*"
126
+ }
127
+ ],
128
+ "Version": "2012-10-17"
129
+ },
130
+ "PolicyName": "LambdaFunctioninlinePolicyAddedToExecutionRole007875684",
131
+ "Roles": [
132
+ {
133
+ "Ref": "LambdaFunctionServiceRole0C4CDE0B"
134
+ }
135
+ ]
136
+ }
137
+ },
149
138
  "testapigatewaylambdaApiAccessLogGroupEB3253A2": {
150
139
  "Type": "AWS::Logs::LogGroup",
151
140
  "UpdateReplacePolicy": "Retain",
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "36.0.0",
2
+ "version": "40.0.0",
3
3
  "files": {
4
4
  "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": {
5
5
  "source": {
@@ -1 +1 @@
1
- {"version":"36.0.0"}
1
+ {"version":"40.0.0"}
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "36.0.0",
2
+ "version": "40.0.0",
3
3
  "testCases": {
4
4
  "apilam-existingFunction/Integ/DefaultTest": {
5
5
  "stacks": [
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "36.0.0",
2
+ "version": "42.0.0",
3
3
  "artifacts": {
4
4
  "apilamexistingFunctionIntegDefaultTestDeployAssert4238FD03.assets": {
5
5
  "type": "cdk:asset-manifest",
@@ -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}/bc3fbfc5711a9e2d22bf42895b4d794f89e0d36e5045bcf3e257ceda41002e7d.json",
69
+ "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/304db3f168db56fbcd5b166040ab5da1df6e246d69ed7c294c02bd3b6f31d8a5.json",
70
70
  "requiresBootstrapStackVersion": 6,
71
71
  "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
72
72
  "additionalDependencies": [
@@ -82,16 +82,68 @@
82
82
  "apilam-existingFunction.assets"
83
83
  ],
84
84
  "metadata": {
85
+ "/apilam-existingFunction/LambdaFunctionServiceRole": [
86
+ {
87
+ "type": "aws:cdk:analytics:construct",
88
+ "data": {
89
+ "assumedBy": {
90
+ "principalAccount": "*",
91
+ "assumeRoleAction": "*"
92
+ },
93
+ "inlinePolicies": "*"
94
+ }
95
+ },
96
+ {
97
+ "type": "aws:cdk:analytics:method",
98
+ "data": {
99
+ "attachInlinePolicy": [
100
+ "*"
101
+ ]
102
+ }
103
+ },
104
+ {
105
+ "type": "aws:cdk:analytics:method",
106
+ "data": {
107
+ "attachInlinePolicy": [
108
+ "*"
109
+ ]
110
+ }
111
+ }
112
+ ],
113
+ "/apilam-existingFunction/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole": [
114
+ {
115
+ "type": "aws:cdk:analytics:construct",
116
+ "data": "*"
117
+ }
118
+ ],
85
119
  "/apilam-existingFunction/LambdaFunctionServiceRole/Resource": [
86
120
  {
87
121
  "type": "aws:cdk:logicalId",
88
122
  "data": "LambdaFunctionServiceRole0C4CDE0B"
89
123
  }
90
124
  ],
91
- "/apilam-existingFunction/LambdaFunctionServiceRole/DefaultPolicy/Resource": [
125
+ "/apilam-existingFunction/LambdaFunction": [
92
126
  {
93
- "type": "aws:cdk:logicalId",
94
- "data": "LambdaFunctionServiceRoleDefaultPolicy126C8897"
127
+ "type": "aws:cdk:analytics:construct",
128
+ "data": {
129
+ "role": "*",
130
+ "tracing": "Active",
131
+ "runtime": "*",
132
+ "handler": "*",
133
+ "code": "*"
134
+ }
135
+ },
136
+ {
137
+ "type": "aws:cdk:analytics:method",
138
+ "data": {
139
+ "addEnvironment": [
140
+ "*",
141
+ "*",
142
+ {
143
+ "removeInEdge": true
144
+ }
145
+ ]
146
+ }
95
147
  }
96
148
  ],
97
149
  "/apilam-existingFunction/LambdaFunction/Resource": [
@@ -100,24 +152,164 @@
100
152
  "data": "LambdaFunctionBF21E41F"
101
153
  }
102
154
  ],
155
+ "/apilam-existingFunction/LambdaFunction/inlinePolicyAddedToExecutionRole-0": [
156
+ {
157
+ "type": "aws:cdk:analytics:construct",
158
+ "data": {
159
+ "statements": "*"
160
+ }
161
+ },
162
+ {
163
+ "type": "aws:cdk:analytics:method",
164
+ "data": {
165
+ "addStatements": [
166
+ {}
167
+ ]
168
+ }
169
+ },
170
+ {
171
+ "type": "aws:cdk:analytics:method",
172
+ "data": {
173
+ "attachToRole": [
174
+ "*"
175
+ ]
176
+ }
177
+ },
178
+ {
179
+ "type": "aws:cdk:analytics:method",
180
+ "data": {
181
+ "attachToRole": [
182
+ "*"
183
+ ]
184
+ }
185
+ }
186
+ ],
187
+ "/apilam-existingFunction/LambdaFunction/inlinePolicyAddedToExecutionRole-0/Resource": [
188
+ {
189
+ "type": "aws:cdk:logicalId",
190
+ "data": "LambdaFunctioninlinePolicyAddedToExecutionRole007875684"
191
+ }
192
+ ],
193
+ "/apilam-existingFunction/test-apigateway-lambda/ApiAccessLogGroup": [
194
+ {
195
+ "type": "aws:cdk:analytics:construct",
196
+ "data": {
197
+ "retention": 9999
198
+ }
199
+ }
200
+ ],
103
201
  "/apilam-existingFunction/test-apigateway-lambda/ApiAccessLogGroup/Resource": [
104
202
  {
105
203
  "type": "aws:cdk:logicalId",
106
204
  "data": "testapigatewaylambdaApiAccessLogGroupEB3253A2"
107
205
  }
108
206
  ],
207
+ "/apilam-existingFunction/test-apigateway-lambda/LambdaRestApi": [
208
+ {
209
+ "type": "aws:cdk:analytics:construct",
210
+ "data": {
211
+ "defaultIntegration": "*",
212
+ "endpointConfiguration": {
213
+ "types": [
214
+ "EDGE"
215
+ ]
216
+ },
217
+ "cloudWatchRole": false,
218
+ "deployOptions": {
219
+ "accessLogDestination": "*",
220
+ "accessLogFormat": "*",
221
+ "loggingLevel": "INFO",
222
+ "dataTraceEnabled": false,
223
+ "tracingEnabled": true
224
+ },
225
+ "defaultMethodOptions": {
226
+ "authorizationType": "*"
227
+ },
228
+ "handler": "*"
229
+ }
230
+ },
231
+ {
232
+ "type": "aws:cdk:analytics:construct",
233
+ "data": {
234
+ "endpointConfiguration": {
235
+ "types": [
236
+ "EDGE"
237
+ ]
238
+ },
239
+ "cloudWatchRole": false,
240
+ "deployOptions": {
241
+ "accessLogDestination": "*",
242
+ "accessLogFormat": "*",
243
+ "loggingLevel": "INFO",
244
+ "dataTraceEnabled": false,
245
+ "tracingEnabled": true
246
+ },
247
+ "defaultMethodOptions": {
248
+ "authorizationType": "*"
249
+ },
250
+ "handler": "*"
251
+ }
252
+ }
253
+ ],
109
254
  "/apilam-existingFunction/test-apigateway-lambda/LambdaRestApi/Resource": [
110
255
  {
111
256
  "type": "aws:cdk:logicalId",
112
257
  "data": "testapigatewaylambdaLambdaRestApiE957E944"
113
258
  }
114
259
  ],
260
+ "/apilam-existingFunction/test-apigateway-lambda/LambdaRestApi/Deployment": [
261
+ {
262
+ "type": "aws:cdk:analytics:construct",
263
+ "data": {
264
+ "description": "*",
265
+ "api": "*",
266
+ "retainDeployments": "*"
267
+ }
268
+ },
269
+ {
270
+ "type": "aws:cdk:analytics:method",
271
+ "data": {
272
+ "addToLogicalId": [
273
+ {}
274
+ ]
275
+ }
276
+ },
277
+ {
278
+ "type": "aws:cdk:analytics:method",
279
+ "data": {
280
+ "addToLogicalId": [
281
+ {}
282
+ ]
283
+ }
284
+ },
285
+ {
286
+ "type": "aws:cdk:analytics:method",
287
+ "data": {
288
+ "addToLogicalId": [
289
+ {}
290
+ ]
291
+ }
292
+ }
293
+ ],
115
294
  "/apilam-existingFunction/test-apigateway-lambda/LambdaRestApi/Deployment/Resource": [
116
295
  {
117
296
  "type": "aws:cdk:logicalId",
118
297
  "data": "testapigatewaylambdaLambdaRestApiDeployment85334BB3938813331492485ced06ab87062fb015"
119
298
  }
120
299
  ],
300
+ "/apilam-existingFunction/test-apigateway-lambda/LambdaRestApi/DeploymentStage.prod": [
301
+ {
302
+ "type": "aws:cdk:analytics:construct",
303
+ "data": {
304
+ "deployment": "*",
305
+ "accessLogDestination": "*",
306
+ "accessLogFormat": "*",
307
+ "loggingLevel": "INFO",
308
+ "dataTraceEnabled": false,
309
+ "tracingEnabled": true
310
+ }
311
+ }
312
+ ],
121
313
  "/apilam-existingFunction/test-apigateway-lambda/LambdaRestApi/DeploymentStage.prod/Resource": [
122
314
  {
123
315
  "type": "aws:cdk:logicalId",
@@ -130,12 +322,53 @@
130
322
  "data": "testapigatewaylambdaLambdaRestApiEndpoint2EF0B753"
131
323
  }
132
324
  ],
325
+ "/apilam-existingFunction/test-apigateway-lambda/LambdaRestApi/Default": [
326
+ {
327
+ "type": "aws:cdk:analytics:construct",
328
+ "data": "*"
329
+ }
330
+ ],
331
+ "/apilam-existingFunction/test-apigateway-lambda/LambdaRestApi/Default/{proxy+}": [
332
+ {
333
+ "type": "aws:cdk:analytics:construct",
334
+ "data": {
335
+ "parent": "*",
336
+ "defaultIntegration": "*",
337
+ "defaultMethodOptions": "*"
338
+ }
339
+ },
340
+ {
341
+ "type": "aws:cdk:analytics:construct",
342
+ "data": {
343
+ "parent": "*"
344
+ }
345
+ },
346
+ {
347
+ "type": "aws:cdk:analytics:method",
348
+ "data": {
349
+ "addMethod": [
350
+ "*"
351
+ ]
352
+ }
353
+ }
354
+ ],
133
355
  "/apilam-existingFunction/test-apigateway-lambda/LambdaRestApi/Default/{proxy+}/Resource": [
134
356
  {
135
357
  "type": "aws:cdk:logicalId",
136
358
  "data": "testapigatewaylambdaLambdaRestApiproxy2C2C544E"
137
359
  }
138
360
  ],
361
+ "/apilam-existingFunction/test-apigateway-lambda/LambdaRestApi/Default/{proxy+}/ANY": [
362
+ {
363
+ "type": "aws:cdk:analytics:construct",
364
+ "data": {
365
+ "resource": "*",
366
+ "httpMethod": "*",
367
+ "integration": "*",
368
+ "options": "*"
369
+ }
370
+ }
371
+ ],
139
372
  "/apilam-existingFunction/test-apigateway-lambda/LambdaRestApi/Default/{proxy+}/ANY/ApiPermission.apilamexistingFunctiontestapigatewaylambdaLambdaRestApiEC1EB7CD.ANY..{proxy+}": [
140
373
  {
141
374
  "type": "aws:cdk:logicalId",
@@ -154,6 +387,17 @@
154
387
  "data": "testapigatewaylambdaLambdaRestApiproxyANYF6150927"
155
388
  }
156
389
  ],
390
+ "/apilam-existingFunction/test-apigateway-lambda/LambdaRestApi/Default/ANY": [
391
+ {
392
+ "type": "aws:cdk:analytics:construct",
393
+ "data": {
394
+ "resource": "*",
395
+ "httpMethod": "*",
396
+ "integration": "*",
397
+ "options": "*"
398
+ }
399
+ }
400
+ ],
157
401
  "/apilam-existingFunction/test-apigateway-lambda/LambdaRestApi/Default/ANY/ApiPermission.apilamexistingFunctiontestapigatewaylambdaLambdaRestApiEC1EB7CD.ANY..": [
158
402
  {
159
403
  "type": "aws:cdk:logicalId",
@@ -172,12 +416,42 @@
172
416
  "data": "testapigatewaylambdaLambdaRestApiANY1FACA749"
173
417
  }
174
418
  ],
419
+ "/apilam-existingFunction/test-apigateway-lambda/LambdaRestApi/UsagePlan": [
420
+ {
421
+ "type": "aws:cdk:analytics:construct",
422
+ "data": {
423
+ "apiStages": [
424
+ {
425
+ "api": "*"
426
+ }
427
+ ]
428
+ }
429
+ }
430
+ ],
175
431
  "/apilam-existingFunction/test-apigateway-lambda/LambdaRestApi/UsagePlan/Resource": [
176
432
  {
177
433
  "type": "aws:cdk:logicalId",
178
434
  "data": "testapigatewaylambdaLambdaRestApiUsagePlan658131E3"
179
435
  }
180
436
  ],
437
+ "/apilam-existingFunction/test-apigateway-lambda/LambdaRestApiCloudWatchRole": [
438
+ {
439
+ "type": "aws:cdk:analytics:construct",
440
+ "data": {
441
+ "assumedBy": {
442
+ "principalAccount": "*",
443
+ "assumeRoleAction": "*"
444
+ },
445
+ "inlinePolicies": "*"
446
+ }
447
+ }
448
+ ],
449
+ "/apilam-existingFunction/test-apigateway-lambda/LambdaRestApiCloudWatchRole/ImportLambdaRestApiCloudWatchRole": [
450
+ {
451
+ "type": "aws:cdk:analytics:construct",
452
+ "data": "*"
453
+ }
454
+ ],
181
455
  "/apilam-existingFunction/test-apigateway-lambda/LambdaRestApiCloudWatchRole/Resource": [
182
456
  {
183
457
  "type": "aws:cdk:logicalId",
@@ -201,6 +475,15 @@
201
475
  "type": "aws:cdk:logicalId",
202
476
  "data": "CheckBootstrapVersion"
203
477
  }
478
+ ],
479
+ "LambdaFunctionServiceRoleDefaultPolicy126C8897": [
480
+ {
481
+ "type": "aws:cdk:logicalId",
482
+ "data": "LambdaFunctionServiceRoleDefaultPolicy126C8897",
483
+ "trace": [
484
+ "!!DESTRUCTIVE_CHANGES: WILL_DESTROY"
485
+ ]
486
+ }
204
487
  ]
205
488
  },
206
489
  "displayName": "apilam-existingFunction"
@@ -211,5 +494,6 @@
211
494
  "file": "tree.json"
212
495
  }
213
496
  }
214
- }
497
+ },
498
+ "minimumCliVersion": "2.1006.0"
215
499
  }