@aws-solutions-constructs/aws-apigateway-dynamodb 2.51.0 → 2.52.1

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 (65) hide show
  1. package/.eslintignore +2 -0
  2. package/.jsii +49 -4
  3. package/integ.config.json +7 -0
  4. package/lib/index.js +1 -1
  5. package/package.json +9 -8
  6. package/test/integ.apiddb-additional-request-templates-custom-resource-name.js +5 -2
  7. package/test/integ.apiddb-additional-request-templates-custom-resource-name.js.snapshot/apiddb-additional-request-templates-custom-resource-name.assets.json +19 -0
  8. package/test/integ.apiddb-additional-request-templates-custom-resource-name.js.snapshot/apiddb-additional-request-templates-custom-resource-name.template.json +426 -0
  9. package/test/integ.apiddb-additional-request-templates-custom-resource-name.js.snapshot/apiddbadditionalrequesttemplatescustomresourcenameIntegDefaultTestDeployAssertABD5B2B6.assets.json +19 -0
  10. package/test/integ.apiddb-additional-request-templates-custom-resource-name.js.snapshot/apiddbadditionalrequesttemplatescustomresourcenameIntegDefaultTestDeployAssertABD5B2B6.template.json +36 -0
  11. package/test/integ.apiddb-additional-request-templates-custom-resource-name.js.snapshot/cdk.out +1 -0
  12. package/test/integ.apiddb-additional-request-templates-custom-resource-name.js.snapshot/integ.json +12 -0
  13. package/test/integ.apiddb-additional-request-templates-custom-resource-name.js.snapshot/manifest.json +185 -0
  14. package/test/integ.apiddb-additional-request-templates-custom-resource-name.js.snapshot/tree.json +684 -0
  15. package/test/integ.apiddb-additional-request-templates.js +5 -2
  16. package/test/integ.apiddb-additional-request-templates.js.snapshot/apiddb-additional-request-templates.assets.json +19 -0
  17. package/test/integ.apiddb-additional-request-templates.js.snapshot/apiddb-additional-request-templates.template.json +418 -0
  18. package/test/integ.apiddb-additional-request-templates.js.snapshot/apiddbadditionalrequesttemplatesIntegDefaultTestDeployAssert01278153.assets.json +19 -0
  19. package/test/integ.apiddb-additional-request-templates.js.snapshot/apiddbadditionalrequesttemplatesIntegDefaultTestDeployAssert01278153.template.json +36 -0
  20. package/test/integ.apiddb-additional-request-templates.js.snapshot/cdk.out +1 -0
  21. package/test/integ.apiddb-additional-request-templates.js.snapshot/integ.json +12 -0
  22. package/test/integ.apiddb-additional-request-templates.js.snapshot/manifest.json +185 -0
  23. package/test/integ.apiddb-additional-request-templates.js.snapshot/tree.json +676 -0
  24. package/test/integ.apiddb-apigateway-dynamodb-CRUD.js +5 -2
  25. package/test/integ.apiddb-apigateway-dynamodb-CRUD.js.snapshot/apiddb-apigateway-dynamodb-CRUD.assets.json +19 -0
  26. package/test/integ.apiddb-apigateway-dynamodb-CRUD.js.snapshot/apiddb-apigateway-dynamodb-CRUD.template.json +666 -0
  27. package/test/integ.apiddb-apigateway-dynamodb-CRUD.js.snapshot/apiddbapigatewaydynamodbCRUDIntegDefaultTestDeployAssert492DC8FE.assets.json +19 -0
  28. package/test/integ.apiddb-apigateway-dynamodb-CRUD.js.snapshot/apiddbapigatewaydynamodbCRUDIntegDefaultTestDeployAssert492DC8FE.template.json +36 -0
  29. package/test/integ.apiddb-apigateway-dynamodb-CRUD.js.snapshot/cdk.out +1 -0
  30. package/test/integ.apiddb-apigateway-dynamodb-CRUD.js.snapshot/integ.json +12 -0
  31. package/test/integ.apiddb-apigateway-dynamodb-CRUD.js.snapshot/manifest.json +203 -0
  32. package/test/integ.apiddb-apigateway-dynamodb-CRUD.js.snapshot/tree.json +975 -0
  33. package/test/integ.apiddb-apigateway-dynamodb-existing-table.js +5 -2
  34. package/test/integ.apiddb-apigateway-dynamodb-existing-table.js.snapshot/apiddb-apigateway-dynamodb-existing-table.assets.json +19 -0
  35. package/test/integ.apiddb-apigateway-dynamodb-existing-table.js.snapshot/apiddb-apigateway-dynamodb-existing-table.template.json +406 -0
  36. package/test/integ.apiddb-apigateway-dynamodb-existing-table.js.snapshot/apiddbapigatewaydynamodbexistingtableIntegDefaultTestDeployAssertD38D4AB2.assets.json +19 -0
  37. package/test/integ.apiddb-apigateway-dynamodb-existing-table.js.snapshot/apiddbapigatewaydynamodbexistingtableIntegDefaultTestDeployAssertD38D4AB2.template.json +36 -0
  38. package/test/integ.apiddb-apigateway-dynamodb-existing-table.js.snapshot/cdk.out +1 -0
  39. package/test/integ.apiddb-apigateway-dynamodb-existing-table.js.snapshot/integ.json +12 -0
  40. package/test/integ.apiddb-apigateway-dynamodb-existing-table.js.snapshot/manifest.json +185 -0
  41. package/test/integ.apiddb-apigateway-dynamodb-existing-table.js.snapshot/tree.json +664 -0
  42. package/test/integ.apiddb-custom-integration-responses.js +5 -2
  43. package/test/integ.apiddb-custom-integration-responses.js.snapshot/apiddb-custom-integration-responses.assets.json +19 -0
  44. package/test/integ.apiddb-custom-integration-responses.js.snapshot/apiddb-custom-integration-responses.template.json +406 -0
  45. package/test/integ.apiddb-custom-integration-responses.js.snapshot/apiddbcustomintegrationresponsesIntegDefaultTestDeployAssert9F4582C4.assets.json +19 -0
  46. package/test/integ.apiddb-custom-integration-responses.js.snapshot/apiddbcustomintegrationresponsesIntegDefaultTestDeployAssert9F4582C4.template.json +36 -0
  47. package/test/integ.apiddb-custom-integration-responses.js.snapshot/cdk.out +1 -0
  48. package/test/integ.apiddb-custom-integration-responses.js.snapshot/integ.json +12 -0
  49. package/test/integ.apiddb-custom-integration-responses.js.snapshot/manifest.json +185 -0
  50. package/test/integ.apiddb-custom-integration-responses.js.snapshot/tree.json +664 -0
  51. package/test/integ.apiddb-no-arguments.js +5 -2
  52. package/test/integ.apiddb-no-arguments.js.snapshot/apiddb-no-arguments.assets.json +19 -0
  53. package/test/integ.apiddb-no-arguments.js.snapshot/apiddb-no-arguments.template.json +406 -0
  54. package/test/integ.apiddb-no-arguments.js.snapshot/apiddbnoargumentsIntegDefaultTestDeployAssert79BAC49F.assets.json +19 -0
  55. package/test/integ.apiddb-no-arguments.js.snapshot/apiddbnoargumentsIntegDefaultTestDeployAssert79BAC49F.template.json +36 -0
  56. package/test/integ.apiddb-no-arguments.js.snapshot/cdk.out +1 -0
  57. package/test/integ.apiddb-no-arguments.js.snapshot/integ.json +12 -0
  58. package/test/integ.apiddb-no-arguments.js.snapshot/manifest.json +185 -0
  59. package/test/integ.apiddb-no-arguments.js.snapshot/tree.json +664 -0
  60. package/test/integ.apiddb-additional-request-templates-custom-resource-name.expected.json +0 -426
  61. package/test/integ.apiddb-additional-request-templates.expected.json +0 -418
  62. package/test/integ.apiddb-apigateway-dynamodb-CRUD.expected.json +0 -691
  63. package/test/integ.apiddb-apigateway-dynamodb-existing-table.expected.json +0 -406
  64. package/test/integ.apiddb-custom-integration-responses.expected.json +0 -406
  65. package/test/integ.apiddb-no-arguments.expected.json +0 -406
@@ -1,691 +0,0 @@
1
- {
2
- "Description": "Integration Test for aws-apigateway-dynamodb",
3
- "Resources": {
4
- "testapigatewaydynamodbDynamoTableEEE3F463": {
5
- "Type": "AWS::DynamoDB::Table",
6
- "Properties": {
7
- "AttributeDefinitions": [
8
- {
9
- "AttributeName": "id",
10
- "AttributeType": "S"
11
- }
12
- ],
13
- "BillingMode": "PAY_PER_REQUEST",
14
- "KeySchema": [
15
- {
16
- "AttributeName": "id",
17
- "KeyType": "HASH"
18
- }
19
- ],
20
- "PointInTimeRecoverySpecification": {
21
- "PointInTimeRecoveryEnabled": true
22
- },
23
- "SSESpecification": {
24
- "SSEEnabled": true
25
- }
26
- },
27
- "UpdateReplacePolicy": "Retain",
28
- "DeletionPolicy": "Retain"
29
- },
30
- "testapigatewaydynamodbApiAccessLogGroup3F457756": {
31
- "Type": "AWS::Logs::LogGroup",
32
- "UpdateReplacePolicy": "Retain",
33
- "DeletionPolicy": "Retain",
34
- "Metadata": {
35
- "cfn_nag": {
36
- "rules_to_suppress": [
37
- {
38
- "id": "W86",
39
- "reason": "Retention period for CloudWatchLogs LogGroups are set to 'Never Expire' to preserve customer data indefinitely"
40
- },
41
- {
42
- "id": "W84",
43
- "reason": "By default CloudWatchLogs LogGroups data is encrypted using the CloudWatch server-side encryption keys (AWS Managed Keys)"
44
- }
45
- ]
46
- }
47
- }
48
- },
49
- "testapigatewaydynamodbRestApi80489300": {
50
- "Type": "AWS::ApiGateway::RestApi",
51
- "Properties": {
52
- "EndpointConfiguration": {
53
- "Types": [
54
- "EDGE"
55
- ]
56
- },
57
- "Name": "RestApi"
58
- }
59
- },
60
- "testapigatewaydynamodbRestApiDeployment1898674B00abb8cad507ed5309ac584f2dddf379": {
61
- "Type": "AWS::ApiGateway::Deployment",
62
- "Properties": {
63
- "Description": "Automatically created by the RestApi construct",
64
- "RestApiId": {
65
- "Ref": "testapigatewaydynamodbRestApi80489300"
66
- }
67
- },
68
- "DependsOn": [
69
- "testapigatewaydynamodbRestApiidDELETE6FC8A9F3",
70
- "testapigatewaydynamodbRestApiidGET6196F638",
71
- "testapigatewaydynamodbRestApiidPUT1F965B23",
72
- "testapigatewaydynamodbRestApiid78018D34",
73
- "testapigatewaydynamodbRestApiPOSTE99BD0BD"
74
- ],
75
- "Metadata": {
76
- "cfn_nag": {
77
- "rules_to_suppress": [
78
- {
79
- "id": "W45",
80
- "reason": "ApiGateway has AccessLogging enabled in AWS::ApiGateway::Stage resource, but cfn_nag checks for it in AWS::ApiGateway::Deployment resource"
81
- }
82
- ]
83
- }
84
- }
85
- },
86
- "testapigatewaydynamodbRestApiDeploymentStageprod2855C2C3": {
87
- "Type": "AWS::ApiGateway::Stage",
88
- "Properties": {
89
- "AccessLogSetting": {
90
- "DestinationArn": {
91
- "Fn::GetAtt": [
92
- "testapigatewaydynamodbApiAccessLogGroup3F457756",
93
- "Arn"
94
- ]
95
- },
96
- "Format": "{\"requestId\":\"$context.requestId\",\"ip\":\"$context.identity.sourceIp\",\"user\":\"$context.identity.user\",\"caller\":\"$context.identity.caller\",\"requestTime\":\"$context.requestTime\",\"httpMethod\":\"$context.httpMethod\",\"resourcePath\":\"$context.resourcePath\",\"status\":\"$context.status\",\"protocol\":\"$context.protocol\",\"responseLength\":\"$context.responseLength\"}"
97
- },
98
- "DeploymentId": {
99
- "Ref": "testapigatewaydynamodbRestApiDeployment1898674B00abb8cad507ed5309ac584f2dddf379"
100
- },
101
- "MethodSettings": [
102
- {
103
- "DataTraceEnabled": false,
104
- "HttpMethod": "*",
105
- "LoggingLevel": "INFO",
106
- "ResourcePath": "/*"
107
- }
108
- ],
109
- "RestApiId": {
110
- "Ref": "testapigatewaydynamodbRestApi80489300"
111
- },
112
- "StageName": "prod",
113
- "TracingEnabled": true
114
- }
115
- },
116
- "testapigatewaydynamodbRestApiid78018D34": {
117
- "Type": "AWS::ApiGateway::Resource",
118
- "Properties": {
119
- "ParentId": {
120
- "Fn::GetAtt": [
121
- "testapigatewaydynamodbRestApi80489300",
122
- "RootResourceId"
123
- ]
124
- },
125
- "PathPart": "{id}",
126
- "RestApiId": {
127
- "Ref": "testapigatewaydynamodbRestApi80489300"
128
- }
129
- }
130
- },
131
- "testapigatewaydynamodbRestApiidGET6196F638": {
132
- "Type": "AWS::ApiGateway::Method",
133
- "Properties": {
134
- "AuthorizationType": "AWS_IAM",
135
- "HttpMethod": "GET",
136
- "Integration": {
137
- "Credentials": {
138
- "Fn::GetAtt": [
139
- "testapigatewaydynamodbapigatewayrole961B19C4",
140
- "Arn"
141
- ]
142
- },
143
- "IntegrationHttpMethod": "POST",
144
- "IntegrationResponses": [
145
- {
146
- "StatusCode": "200"
147
- },
148
- {
149
- "ResponseTemplates": {
150
- "text/html": "Error"
151
- },
152
- "SelectionPattern": "500",
153
- "StatusCode": "500"
154
- }
155
- ],
156
- "PassthroughBehavior": "NEVER",
157
- "RequestParameters": {
158
- "integration.request.header.Content-Type": "'application/json'"
159
- },
160
- "RequestTemplates": {
161
- "application/json": {
162
- "Fn::Join": [
163
- "",
164
- [
165
- "{ \"TableName\": \"",
166
- {
167
- "Ref": "testapigatewaydynamodbDynamoTableEEE3F463"
168
- },
169
- "\", \"KeyConditionExpression\": \"id = :v1\", \"ExpressionAttributeValues\": { \":v1\": { \"S\": \"$input.params('id')\" } } }"
170
- ]
171
- ]
172
- }
173
- },
174
- "Type": "AWS",
175
- "Uri": {
176
- "Fn::Join": [
177
- "",
178
- [
179
- "arn:",
180
- {
181
- "Ref": "AWS::Partition"
182
- },
183
- ":apigateway:",
184
- {
185
- "Ref": "AWS::Region"
186
- },
187
- ":dynamodb:action/Query"
188
- ]
189
- ]
190
- }
191
- },
192
- "MethodResponses": [
193
- {
194
- "ResponseParameters": {
195
- "method.response.header.Content-Type": true
196
- },
197
- "StatusCode": "200"
198
- },
199
- {
200
- "ResponseParameters": {
201
- "method.response.header.Content-Type": true
202
- },
203
- "StatusCode": "500"
204
- }
205
- ],
206
- "ResourceId": {
207
- "Ref": "testapigatewaydynamodbRestApiid78018D34"
208
- },
209
- "RestApiId": {
210
- "Ref": "testapigatewaydynamodbRestApi80489300"
211
- }
212
- }
213
- },
214
- "testapigatewaydynamodbRestApiidPUT1F965B23": {
215
- "Type": "AWS::ApiGateway::Method",
216
- "Properties": {
217
- "AuthorizationType": "AWS_IAM",
218
- "HttpMethod": "PUT",
219
- "Integration": {
220
- "Credentials": {
221
- "Fn::GetAtt": [
222
- "testapigatewaydynamodbapigatewayrole961B19C4",
223
- "Arn"
224
- ]
225
- },
226
- "IntegrationHttpMethod": "POST",
227
- "IntegrationResponses": [
228
- {
229
- "StatusCode": "200"
230
- },
231
- {
232
- "ResponseTemplates": {
233
- "text/html": "Error"
234
- },
235
- "SelectionPattern": "500",
236
- "StatusCode": "500"
237
- }
238
- ],
239
- "PassthroughBehavior": "NEVER",
240
- "RequestParameters": {
241
- "integration.request.header.Content-Type": "'application/json'"
242
- },
243
- "RequestTemplates": {
244
- "application/json": {
245
- "Fn::Join": [
246
- "",
247
- [
248
- "{\r\n \"TableName\": \"",
249
- {
250
- "Ref": "testapigatewaydynamodbDynamoTableEEE3F463"
251
- },
252
- "\",\r\n \"Key\": {\r\n \"id\": {\r\n \"S\": \"$input.path('$.id')\"\r\n }\r\n },\r\n \"ExpressionAttributeValues\": {\r\n \":event_count\": {\r\n \"N\": \"$input.path('$.EventCount')\"\r\n },\r\n \":message\": {\r\n \"S\": \"$input.path('$.Message')\"\r\n }\r\n },\r\n \"UpdateExpression\": \"ADD EventCount :event_count SET Message = :message\",\r\n \"ReturnValues\": \"ALL_NEW\"\r\n}"
253
- ]
254
- ]
255
- }
256
- },
257
- "Type": "AWS",
258
- "Uri": {
259
- "Fn::Join": [
260
- "",
261
- [
262
- "arn:",
263
- {
264
- "Ref": "AWS::Partition"
265
- },
266
- ":apigateway:",
267
- {
268
- "Ref": "AWS::Region"
269
- },
270
- ":dynamodb:action/UpdateItem"
271
- ]
272
- ]
273
- }
274
- },
275
- "MethodResponses": [
276
- {
277
- "ResponseParameters": {
278
- "method.response.header.Content-Type": true
279
- },
280
- "StatusCode": "200"
281
- },
282
- {
283
- "ResponseParameters": {
284
- "method.response.header.Content-Type": true
285
- },
286
- "StatusCode": "500"
287
- }
288
- ],
289
- "ResourceId": {
290
- "Ref": "testapigatewaydynamodbRestApiid78018D34"
291
- },
292
- "RestApiId": {
293
- "Ref": "testapigatewaydynamodbRestApi80489300"
294
- }
295
- }
296
- },
297
- "testapigatewaydynamodbRestApiidDELETE6FC8A9F3": {
298
- "Type": "AWS::ApiGateway::Method",
299
- "Properties": {
300
- "AuthorizationType": "AWS_IAM",
301
- "HttpMethod": "DELETE",
302
- "Integration": {
303
- "Credentials": {
304
- "Fn::GetAtt": [
305
- "testapigatewaydynamodbapigatewayrole961B19C4",
306
- "Arn"
307
- ]
308
- },
309
- "IntegrationHttpMethod": "POST",
310
- "IntegrationResponses": [
311
- {
312
- "StatusCode": "200"
313
- },
314
- {
315
- "ResponseTemplates": {
316
- "text/html": "Error"
317
- },
318
- "SelectionPattern": "500",
319
- "StatusCode": "500"
320
- }
321
- ],
322
- "PassthroughBehavior": "NEVER",
323
- "RequestParameters": {
324
- "integration.request.header.Content-Type": "'application/json'"
325
- },
326
- "RequestTemplates": {
327
- "application/json": {
328
- "Fn::Join": [
329
- "",
330
- [
331
- "{ \"TableName\": \"",
332
- {
333
- "Ref": "testapigatewaydynamodbDynamoTableEEE3F463"
334
- },
335
- "\", \"Key\": { \"id\": { \"S\": \"$input.params('id')\" } }, \"ReturnValues\": \"ALL_OLD\" }"
336
- ]
337
- ]
338
- }
339
- },
340
- "Type": "AWS",
341
- "Uri": {
342
- "Fn::Join": [
343
- "",
344
- [
345
- "arn:",
346
- {
347
- "Ref": "AWS::Partition"
348
- },
349
- ":apigateway:",
350
- {
351
- "Ref": "AWS::Region"
352
- },
353
- ":dynamodb:action/DeleteItem"
354
- ]
355
- ]
356
- }
357
- },
358
- "MethodResponses": [
359
- {
360
- "ResponseParameters": {
361
- "method.response.header.Content-Type": true
362
- },
363
- "StatusCode": "200"
364
- },
365
- {
366
- "ResponseParameters": {
367
- "method.response.header.Content-Type": true
368
- },
369
- "StatusCode": "500"
370
- }
371
- ],
372
- "ResourceId": {
373
- "Ref": "testapigatewaydynamodbRestApiid78018D34"
374
- },
375
- "RestApiId": {
376
- "Ref": "testapigatewaydynamodbRestApi80489300"
377
- }
378
- }
379
- },
380
- "testapigatewaydynamodbRestApiPOSTE99BD0BD": {
381
- "Type": "AWS::ApiGateway::Method",
382
- "Properties": {
383
- "AuthorizationType": "AWS_IAM",
384
- "HttpMethod": "POST",
385
- "Integration": {
386
- "Credentials": {
387
- "Fn::GetAtt": [
388
- "testapigatewaydynamodbapigatewayrole961B19C4",
389
- "Arn"
390
- ]
391
- },
392
- "IntegrationHttpMethod": "POST",
393
- "IntegrationResponses": [
394
- {
395
- "StatusCode": "200"
396
- },
397
- {
398
- "ResponseTemplates": {
399
- "text/html": "Error"
400
- },
401
- "SelectionPattern": "500",
402
- "StatusCode": "500"
403
- }
404
- ],
405
- "PassthroughBehavior": "NEVER",
406
- "RequestParameters": {
407
- "integration.request.header.Content-Type": "'application/json'"
408
- },
409
- "RequestTemplates": {
410
- "application/json": {
411
- "Fn::Join": [
412
- "",
413
- [
414
- "{\r\n \"TableName\": \"",
415
- {
416
- "Ref": "testapigatewaydynamodbDynamoTableEEE3F463"
417
- },
418
- "\",\r\n \"Item\": {\r\n \"id\": {\r\n \"S\": \"$input.path('$.id')\"\r\n },\r\n \"EventCount\": {\r\n \"N\": \"$input.path('$.EventCount')\"\r\n },\r\n \"Message\": {\r\n \"S\": \"$input.path('$.Message')\"\r\n }\r\n }\r\n}"
419
- ]
420
- ]
421
- }
422
- },
423
- "Type": "AWS",
424
- "Uri": {
425
- "Fn::Join": [
426
- "",
427
- [
428
- "arn:",
429
- {
430
- "Ref": "AWS::Partition"
431
- },
432
- ":apigateway:",
433
- {
434
- "Ref": "AWS::Region"
435
- },
436
- ":dynamodb:action/PutItem"
437
- ]
438
- ]
439
- }
440
- },
441
- "MethodResponses": [
442
- {
443
- "ResponseParameters": {
444
- "method.response.header.Content-Type": true
445
- },
446
- "StatusCode": "200"
447
- },
448
- {
449
- "ResponseParameters": {
450
- "method.response.header.Content-Type": true
451
- },
452
- "StatusCode": "500"
453
- }
454
- ],
455
- "ResourceId": {
456
- "Fn::GetAtt": [
457
- "testapigatewaydynamodbRestApi80489300",
458
- "RootResourceId"
459
- ]
460
- },
461
- "RestApiId": {
462
- "Ref": "testapigatewaydynamodbRestApi80489300"
463
- }
464
- }
465
- },
466
- "testapigatewaydynamodbRestApiUsagePlan244F06C8": {
467
- "Type": "AWS::ApiGateway::UsagePlan",
468
- "Properties": {
469
- "ApiStages": [
470
- {
471
- "ApiId": {
472
- "Ref": "testapigatewaydynamodbRestApi80489300"
473
- },
474
- "Stage": {
475
- "Ref": "testapigatewaydynamodbRestApiDeploymentStageprod2855C2C3"
476
- },
477
- "Throttle": {}
478
- }
479
- ]
480
- }
481
- },
482
- "testapigatewaydynamodbLambdaRestApiCloudWatchRoleD176CA9E": {
483
- "Type": "AWS::IAM::Role",
484
- "Properties": {
485
- "AssumeRolePolicyDocument": {
486
- "Statement": [
487
- {
488
- "Action": "sts:AssumeRole",
489
- "Effect": "Allow",
490
- "Principal": {
491
- "Service": "apigateway.amazonaws.com"
492
- }
493
- }
494
- ],
495
- "Version": "2012-10-17"
496
- },
497
- "Policies": [
498
- {
499
- "PolicyDocument": {
500
- "Statement": [
501
- {
502
- "Action": [
503
- "logs:CreateLogGroup",
504
- "logs:CreateLogStream",
505
- "logs:DescribeLogGroups",
506
- "logs:DescribeLogStreams",
507
- "logs:PutLogEvents",
508
- "logs:GetLogEvents",
509
- "logs:FilterLogEvents"
510
- ],
511
- "Effect": "Allow",
512
- "Resource": {
513
- "Fn::Join": [
514
- "",
515
- [
516
- "arn:",
517
- {
518
- "Ref": "AWS::Partition"
519
- },
520
- ":logs:",
521
- {
522
- "Ref": "AWS::Region"
523
- },
524
- ":",
525
- {
526
- "Ref": "AWS::AccountId"
527
- },
528
- ":*"
529
- ]
530
- ]
531
- }
532
- }
533
- ],
534
- "Version": "2012-10-17"
535
- },
536
- "PolicyName": "LambdaRestApiCloudWatchRolePolicy"
537
- }
538
- ]
539
- }
540
- },
541
- "testapigatewaydynamodbLambdaRestApiAccount3608999D": {
542
- "Type": "AWS::ApiGateway::Account",
543
- "Properties": {
544
- "CloudWatchRoleArn": {
545
- "Fn::GetAtt": [
546
- "testapigatewaydynamodbLambdaRestApiCloudWatchRoleD176CA9E",
547
- "Arn"
548
- ]
549
- }
550
- },
551
- "DependsOn": [
552
- "testapigatewaydynamodbRestApi80489300"
553
- ]
554
- },
555
- "testapigatewaydynamodbapigatewayrole961B19C4": {
556
- "Type": "AWS::IAM::Role",
557
- "Properties": {
558
- "AssumeRolePolicyDocument": {
559
- "Statement": [
560
- {
561
- "Action": "sts:AssumeRole",
562
- "Effect": "Allow",
563
- "Principal": {
564
- "Service": "apigateway.amazonaws.com"
565
- }
566
- }
567
- ],
568
- "Version": "2012-10-17"
569
- }
570
- }
571
- },
572
- "testapigatewaydynamodbapigatewayroleDefaultPolicy43AC565D": {
573
- "Type": "AWS::IAM::Policy",
574
- "Properties": {
575
- "PolicyDocument": {
576
- "Statement": [
577
- {
578
- "Action": "dynamodb:PutItem",
579
- "Effect": "Allow",
580
- "Resource": {
581
- "Fn::GetAtt": [
582
- "testapigatewaydynamodbDynamoTableEEE3F463",
583
- "Arn"
584
- ]
585
- }
586
- },
587
- {
588
- "Action": "dynamodb:Query",
589
- "Effect": "Allow",
590
- "Resource": {
591
- "Fn::GetAtt": [
592
- "testapigatewaydynamodbDynamoTableEEE3F463",
593
- "Arn"
594
- ]
595
- }
596
- },
597
- {
598
- "Action": "dynamodb:UpdateItem",
599
- "Effect": "Allow",
600
- "Resource": {
601
- "Fn::GetAtt": [
602
- "testapigatewaydynamodbDynamoTableEEE3F463",
603
- "Arn"
604
- ]
605
- }
606
- },
607
- {
608
- "Action": "dynamodb:DeleteItem",
609
- "Effect": "Allow",
610
- "Resource": {
611
- "Fn::GetAtt": [
612
- "testapigatewaydynamodbDynamoTableEEE3F463",
613
- "Arn"
614
- ]
615
- }
616
- }
617
- ],
618
- "Version": "2012-10-17"
619
- },
620
- "PolicyName": "testapigatewaydynamodbapigatewayroleDefaultPolicy43AC565D",
621
- "Roles": [
622
- {
623
- "Ref": "testapigatewaydynamodbapigatewayrole961B19C4"
624
- }
625
- ]
626
- }
627
- }
628
- },
629
- "Outputs": {
630
- "testapigatewaydynamodbRestApiEndpoint18D89CA6": {
631
- "Value": {
632
- "Fn::Join": [
633
- "",
634
- [
635
- "https://",
636
- {
637
- "Ref": "testapigatewaydynamodbRestApi80489300"
638
- },
639
- ".execute-api.",
640
- {
641
- "Ref": "AWS::Region"
642
- },
643
- ".",
644
- {
645
- "Ref": "AWS::URLSuffix"
646
- },
647
- "/",
648
- {
649
- "Ref": "testapigatewaydynamodbRestApiDeploymentStageprod2855C2C3"
650
- },
651
- "/"
652
- ]
653
- ]
654
- }
655
- }
656
- },
657
- "Parameters": {
658
- "BootstrapVersion": {
659
- "Type": "AWS::SSM::Parameter::Value<String>",
660
- "Default": "/cdk-bootstrap/hnb659fds/version",
661
- "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
662
- }
663
- },
664
- "Rules": {
665
- "CheckBootstrapVersion": {
666
- "Assertions": [
667
- {
668
- "Assert": {
669
- "Fn::Not": [
670
- {
671
- "Fn::Contains": [
672
- [
673
- "1",
674
- "2",
675
- "3",
676
- "4",
677
- "5"
678
- ],
679
- {
680
- "Ref": "BootstrapVersion"
681
- }
682
- ]
683
- }
684
- ]
685
- },
686
- "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
687
- }
688
- ]
689
- }
690
- }
691
- }