@aws-solutions-constructs/aws-lambda-elasticachememcached 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 (44) 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.lammem-existingResources.js +6 -2
  7. package/test/integ.lammem-existingResources.js.snapshot/asset.c1b23d6af38c04acb744bda25a3dc7f4394daea942c67eaff40911a707a3c37a/index.js +8 -0
  8. package/test/integ.lammem-existingResources.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js +1 -0
  9. package/test/integ.lammem-existingResources.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js +1 -0
  10. package/test/integ.lammem-existingResources.js.snapshot/cdk.out +1 -0
  11. package/test/integ.lammem-existingResources.js.snapshot/integ.json +12 -0
  12. package/test/integ.lammem-existingResources.js.snapshot/lammem-existingResources.assets.json +45 -0
  13. package/test/integ.lammem-existingResources.js.snapshot/lammem-existingResources.template.json +720 -0
  14. package/test/integ.lammem-existingResources.js.snapshot/lammemexistingResourcesIntegDefaultTestDeployAssertD269DF67.assets.json +19 -0
  15. package/test/integ.lammem-existingResources.js.snapshot/lammemexistingResourcesIntegDefaultTestDeployAssertD269DF67.template.json +36 -0
  16. package/test/integ.lammem-existingResources.js.snapshot/manifest.json +239 -0
  17. package/test/integ.lammem-existingResources.js.snapshot/tree.json +947 -0
  18. package/test/integ.lammem-newResources.js +6 -2
  19. package/test/integ.lammem-newResources.js.snapshot/asset.c1b23d6af38c04acb744bda25a3dc7f4394daea942c67eaff40911a707a3c37a/index.js +8 -0
  20. package/test/integ.lammem-newResources.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js +1 -0
  21. package/test/integ.lammem-newResources.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js +1 -0
  22. package/test/integ.lammem-newResources.js.snapshot/cdk.out +1 -0
  23. package/test/integ.lammem-newResources.js.snapshot/integ.json +12 -0
  24. package/test/integ.lammem-newResources.js.snapshot/lammem-newResources.assets.json +45 -0
  25. package/test/integ.lammem-newResources.js.snapshot/lammem-newResources.template.json +726 -0
  26. package/test/integ.lammem-newResources.js.snapshot/lammemnewResourcesIntegDefaultTestDeployAssert30C906BF.assets.json +19 -0
  27. package/test/integ.lammem-newResources.js.snapshot/lammemnewResourcesIntegDefaultTestDeployAssert30C906BF.template.json +36 -0
  28. package/test/integ.lammem-newResources.js.snapshot/manifest.json +239 -0
  29. package/test/integ.lammem-newResources.js.snapshot/tree.json +966 -0
  30. package/test/integ.lammem-withClientProps.js +6 -2
  31. package/test/integ.lammem-withClientProps.js.snapshot/asset.c1b23d6af38c04acb744bda25a3dc7f4394daea942c67eaff40911a707a3c37a/index.js +8 -0
  32. package/test/integ.lammem-withClientProps.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js +1 -0
  33. package/test/integ.lammem-withClientProps.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js +1 -0
  34. package/test/integ.lammem-withClientProps.js.snapshot/cdk.out +1 -0
  35. package/test/integ.lammem-withClientProps.js.snapshot/integ.json +12 -0
  36. package/test/integ.lammem-withClientProps.js.snapshot/lammem-withClientProps.assets.json +45 -0
  37. package/test/integ.lammem-withClientProps.js.snapshot/lammem-withClientProps.template.json +726 -0
  38. package/test/integ.lammem-withClientProps.js.snapshot/lammemwithClientPropsIntegDefaultTestDeployAssertDB086BD1.assets.json +19 -0
  39. package/test/integ.lammem-withClientProps.js.snapshot/lammemwithClientPropsIntegDefaultTestDeployAssertDB086BD1.template.json +36 -0
  40. package/test/integ.lammem-withClientProps.js.snapshot/manifest.json +239 -0
  41. package/test/integ.lammem-withClientProps.js.snapshot/tree.json +966 -0
  42. package/test/integ.lammem-existingResources.expected.json +0 -630
  43. package/test/integ.lammem-newResources.expected.json +0 -641
  44. package/test/integ.lammem-withClientProps.expected.json +0 -641
@@ -0,0 +1,720 @@
1
+ {
2
+ "Description": "Integration Test with existing vpc, Lambda function and cache",
3
+ "Resources": {
4
+ "Vpc8378EB38": {
5
+ "Type": "AWS::EC2::VPC",
6
+ "Properties": {
7
+ "CidrBlock": "172.168.0.0/16",
8
+ "EnableDnsHostnames": true,
9
+ "EnableDnsSupport": true,
10
+ "InstanceTenancy": "default",
11
+ "Tags": [
12
+ {
13
+ "Key": "Name",
14
+ "Value": "lammem-existingResources/Vpc"
15
+ }
16
+ ]
17
+ }
18
+ },
19
+ "VpcisolatedSubnet1SubnetE62B1B9B": {
20
+ "Type": "AWS::EC2::Subnet",
21
+ "Properties": {
22
+ "AvailabilityZone": {
23
+ "Fn::Select": [
24
+ 0,
25
+ {
26
+ "Fn::GetAZs": ""
27
+ }
28
+ ]
29
+ },
30
+ "CidrBlock": "172.168.0.0/18",
31
+ "MapPublicIpOnLaunch": false,
32
+ "Tags": [
33
+ {
34
+ "Key": "aws-cdk:subnet-name",
35
+ "Value": "isolated"
36
+ },
37
+ {
38
+ "Key": "aws-cdk:subnet-type",
39
+ "Value": "Isolated"
40
+ },
41
+ {
42
+ "Key": "Name",
43
+ "Value": "lammem-existingResources/Vpc/isolatedSubnet1"
44
+ }
45
+ ],
46
+ "VpcId": {
47
+ "Ref": "Vpc8378EB38"
48
+ }
49
+ }
50
+ },
51
+ "VpcisolatedSubnet1RouteTableE442650B": {
52
+ "Type": "AWS::EC2::RouteTable",
53
+ "Properties": {
54
+ "Tags": [
55
+ {
56
+ "Key": "Name",
57
+ "Value": "lammem-existingResources/Vpc/isolatedSubnet1"
58
+ }
59
+ ],
60
+ "VpcId": {
61
+ "Ref": "Vpc8378EB38"
62
+ }
63
+ }
64
+ },
65
+ "VpcisolatedSubnet1RouteTableAssociationD259E31A": {
66
+ "Type": "AWS::EC2::SubnetRouteTableAssociation",
67
+ "Properties": {
68
+ "RouteTableId": {
69
+ "Ref": "VpcisolatedSubnet1RouteTableE442650B"
70
+ },
71
+ "SubnetId": {
72
+ "Ref": "VpcisolatedSubnet1SubnetE62B1B9B"
73
+ }
74
+ }
75
+ },
76
+ "VpcisolatedSubnet2Subnet39217055": {
77
+ "Type": "AWS::EC2::Subnet",
78
+ "Properties": {
79
+ "AvailabilityZone": {
80
+ "Fn::Select": [
81
+ 1,
82
+ {
83
+ "Fn::GetAZs": ""
84
+ }
85
+ ]
86
+ },
87
+ "CidrBlock": "172.168.64.0/18",
88
+ "MapPublicIpOnLaunch": false,
89
+ "Tags": [
90
+ {
91
+ "Key": "aws-cdk:subnet-name",
92
+ "Value": "isolated"
93
+ },
94
+ {
95
+ "Key": "aws-cdk:subnet-type",
96
+ "Value": "Isolated"
97
+ },
98
+ {
99
+ "Key": "Name",
100
+ "Value": "lammem-existingResources/Vpc/isolatedSubnet2"
101
+ }
102
+ ],
103
+ "VpcId": {
104
+ "Ref": "Vpc8378EB38"
105
+ }
106
+ }
107
+ },
108
+ "VpcisolatedSubnet2RouteTable334F9764": {
109
+ "Type": "AWS::EC2::RouteTable",
110
+ "Properties": {
111
+ "Tags": [
112
+ {
113
+ "Key": "Name",
114
+ "Value": "lammem-existingResources/Vpc/isolatedSubnet2"
115
+ }
116
+ ],
117
+ "VpcId": {
118
+ "Ref": "Vpc8378EB38"
119
+ }
120
+ }
121
+ },
122
+ "VpcisolatedSubnet2RouteTableAssociation25A4716F": {
123
+ "Type": "AWS::EC2::SubnetRouteTableAssociation",
124
+ "Properties": {
125
+ "RouteTableId": {
126
+ "Ref": "VpcisolatedSubnet2RouteTable334F9764"
127
+ },
128
+ "SubnetId": {
129
+ "Ref": "VpcisolatedSubnet2Subnet39217055"
130
+ }
131
+ }
132
+ },
133
+ "VpcRestrictDefaultSecurityGroupCustomResourceC73DA2BE": {
134
+ "Type": "Custom::VpcRestrictDefaultSG",
135
+ "Properties": {
136
+ "ServiceToken": {
137
+ "Fn::GetAtt": [
138
+ "CustomVpcRestrictDefaultSGCustomResourceProviderHandlerDC833E5E",
139
+ "Arn"
140
+ ]
141
+ },
142
+ "DefaultSecurityGroupId": {
143
+ "Fn::GetAtt": [
144
+ "Vpc8378EB38",
145
+ "DefaultSecurityGroup"
146
+ ]
147
+ },
148
+ "Account": {
149
+ "Ref": "AWS::AccountId"
150
+ }
151
+ },
152
+ "UpdateReplacePolicy": "Delete",
153
+ "DeletionPolicy": "Delete"
154
+ },
155
+ "VpcFlowLogIAMRole6A475D41": {
156
+ "Type": "AWS::IAM::Role",
157
+ "Properties": {
158
+ "AssumeRolePolicyDocument": {
159
+ "Statement": [
160
+ {
161
+ "Action": "sts:AssumeRole",
162
+ "Effect": "Allow",
163
+ "Principal": {
164
+ "Service": "vpc-flow-logs.amazonaws.com"
165
+ }
166
+ }
167
+ ],
168
+ "Version": "2012-10-17"
169
+ },
170
+ "Tags": [
171
+ {
172
+ "Key": "Name",
173
+ "Value": "lammem-existingResources/Vpc/FlowLog"
174
+ }
175
+ ]
176
+ }
177
+ },
178
+ "VpcFlowLogIAMRoleDefaultPolicy406FB995": {
179
+ "Type": "AWS::IAM::Policy",
180
+ "Properties": {
181
+ "PolicyDocument": {
182
+ "Statement": [
183
+ {
184
+ "Action": [
185
+ "logs:CreateLogStream",
186
+ "logs:DescribeLogStreams",
187
+ "logs:PutLogEvents"
188
+ ],
189
+ "Effect": "Allow",
190
+ "Resource": {
191
+ "Fn::GetAtt": [
192
+ "VpcFlowLogLogGroup7B5C56B9",
193
+ "Arn"
194
+ ]
195
+ }
196
+ },
197
+ {
198
+ "Action": "iam:PassRole",
199
+ "Effect": "Allow",
200
+ "Resource": {
201
+ "Fn::GetAtt": [
202
+ "VpcFlowLogIAMRole6A475D41",
203
+ "Arn"
204
+ ]
205
+ }
206
+ }
207
+ ],
208
+ "Version": "2012-10-17"
209
+ },
210
+ "PolicyName": "VpcFlowLogIAMRoleDefaultPolicy406FB995",
211
+ "Roles": [
212
+ {
213
+ "Ref": "VpcFlowLogIAMRole6A475D41"
214
+ }
215
+ ]
216
+ }
217
+ },
218
+ "VpcFlowLogLogGroup7B5C56B9": {
219
+ "Type": "AWS::Logs::LogGroup",
220
+ "Properties": {
221
+ "RetentionInDays": 731,
222
+ "Tags": [
223
+ {
224
+ "Key": "Name",
225
+ "Value": "lammem-existingResources/Vpc/FlowLog"
226
+ }
227
+ ]
228
+ },
229
+ "UpdateReplacePolicy": "Retain",
230
+ "DeletionPolicy": "Retain",
231
+ "Metadata": {
232
+ "cfn_nag": {
233
+ "rules_to_suppress": [
234
+ {
235
+ "id": "W84",
236
+ "reason": "By default CloudWatchLogs LogGroups data is encrypted using the CloudWatch server-side encryption keys (AWS Managed Keys)"
237
+ }
238
+ ]
239
+ }
240
+ }
241
+ },
242
+ "VpcFlowLog8FF33A73": {
243
+ "Type": "AWS::EC2::FlowLog",
244
+ "Properties": {
245
+ "DeliverLogsPermissionArn": {
246
+ "Fn::GetAtt": [
247
+ "VpcFlowLogIAMRole6A475D41",
248
+ "Arn"
249
+ ]
250
+ },
251
+ "LogDestinationType": "cloud-watch-logs",
252
+ "LogGroupName": {
253
+ "Ref": "VpcFlowLogLogGroup7B5C56B9"
254
+ },
255
+ "ResourceId": {
256
+ "Ref": "Vpc8378EB38"
257
+ },
258
+ "ResourceType": "VPC",
259
+ "Tags": [
260
+ {
261
+ "Key": "Name",
262
+ "Value": "lammem-existingResources/Vpc/FlowLog"
263
+ }
264
+ ],
265
+ "TrafficType": "ALL"
266
+ }
267
+ },
268
+ "CustomVpcRestrictDefaultSGCustomResourceProviderRole26592FE0": {
269
+ "Type": "AWS::IAM::Role",
270
+ "Properties": {
271
+ "AssumeRolePolicyDocument": {
272
+ "Version": "2012-10-17",
273
+ "Statement": [
274
+ {
275
+ "Action": "sts:AssumeRole",
276
+ "Effect": "Allow",
277
+ "Principal": {
278
+ "Service": "lambda.amazonaws.com"
279
+ }
280
+ }
281
+ ]
282
+ },
283
+ "ManagedPolicyArns": [
284
+ {
285
+ "Fn::Sub": "arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
286
+ }
287
+ ],
288
+ "Policies": [
289
+ {
290
+ "PolicyName": "Inline",
291
+ "PolicyDocument": {
292
+ "Version": "2012-10-17",
293
+ "Statement": [
294
+ {
295
+ "Effect": "Allow",
296
+ "Action": [
297
+ "ec2:AuthorizeSecurityGroupIngress",
298
+ "ec2:AuthorizeSecurityGroupEgress",
299
+ "ec2:RevokeSecurityGroupIngress",
300
+ "ec2:RevokeSecurityGroupEgress"
301
+ ],
302
+ "Resource": [
303
+ {
304
+ "Fn::Join": [
305
+ "",
306
+ [
307
+ "arn:",
308
+ {
309
+ "Ref": "AWS::Partition"
310
+ },
311
+ ":ec2:",
312
+ {
313
+ "Ref": "AWS::Region"
314
+ },
315
+ ":",
316
+ {
317
+ "Ref": "AWS::AccountId"
318
+ },
319
+ ":security-group/",
320
+ {
321
+ "Fn::GetAtt": [
322
+ "Vpc8378EB38",
323
+ "DefaultSecurityGroup"
324
+ ]
325
+ }
326
+ ]
327
+ ]
328
+ }
329
+ ]
330
+ }
331
+ ]
332
+ }
333
+ }
334
+ ]
335
+ }
336
+ },
337
+ "CustomVpcRestrictDefaultSGCustomResourceProviderHandlerDC833E5E": {
338
+ "Type": "AWS::Lambda::Function",
339
+ "Properties": {
340
+ "Code": {
341
+ "S3Bucket": {
342
+ "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
343
+ },
344
+ "S3Key": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip"
345
+ },
346
+ "Timeout": 900,
347
+ "MemorySize": 128,
348
+ "Handler": "__entrypoint__.handler",
349
+ "Role": {
350
+ "Fn::GetAtt": [
351
+ "CustomVpcRestrictDefaultSGCustomResourceProviderRole26592FE0",
352
+ "Arn"
353
+ ]
354
+ },
355
+ "Runtime": "nodejs18.x",
356
+ "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group"
357
+ },
358
+ "DependsOn": [
359
+ "CustomVpcRestrictDefaultSGCustomResourceProviderRole26592FE0"
360
+ ],
361
+ "Metadata": {
362
+ "cfn_nag": {
363
+ "rules_to_suppress": [
364
+ {
365
+ "id": "W58",
366
+ "reason": "CDK generated custom resource"
367
+ },
368
+ {
369
+ "id": "W89",
370
+ "reason": "CDK generated custom resource"
371
+ },
372
+ {
373
+ "id": "W92",
374
+ "reason": "CDK generated custom resource"
375
+ }
376
+ ]
377
+ }
378
+ }
379
+ },
380
+ "testsgsecuritygroup89DCF621": {
381
+ "Type": "AWS::EC2::SecurityGroup",
382
+ "Properties": {
383
+ "GroupDescription": "lammem-existingResources/test-sg-security-group",
384
+ "SecurityGroupEgress": [
385
+ {
386
+ "CidrIp": "0.0.0.0/0",
387
+ "Description": "Allow all outbound traffic by default",
388
+ "IpProtocol": "-1"
389
+ }
390
+ ],
391
+ "VpcId": {
392
+ "Ref": "Vpc8378EB38"
393
+ }
394
+ },
395
+ "Metadata": {
396
+ "cfn_nag": {
397
+ "rules_to_suppress": [
398
+ {
399
+ "id": "W5",
400
+ "reason": "Egress of 0.0.0.0/0 is default and generally considered OK"
401
+ },
402
+ {
403
+ "id": "W40",
404
+ "reason": "Egress IPProtocol of -1 is default and generally considered OK"
405
+ }
406
+ ]
407
+ }
408
+ }
409
+ },
410
+ "testfunctionServiceRoleFB85AD63": {
411
+ "Type": "AWS::IAM::Role",
412
+ "Properties": {
413
+ "AssumeRolePolicyDocument": {
414
+ "Statement": [
415
+ {
416
+ "Action": "sts:AssumeRole",
417
+ "Effect": "Allow",
418
+ "Principal": {
419
+ "Service": "lambda.amazonaws.com"
420
+ }
421
+ }
422
+ ],
423
+ "Version": "2012-10-17"
424
+ },
425
+ "ManagedPolicyArns": [
426
+ {
427
+ "Fn::Join": [
428
+ "",
429
+ [
430
+ "arn:",
431
+ {
432
+ "Ref": "AWS::Partition"
433
+ },
434
+ ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
435
+ ]
436
+ ]
437
+ },
438
+ {
439
+ "Fn::Join": [
440
+ "",
441
+ [
442
+ "arn:",
443
+ {
444
+ "Ref": "AWS::Partition"
445
+ },
446
+ ":iam::aws:policy/service-role/AWSLambdaVPCAccessExecutionRole"
447
+ ]
448
+ ]
449
+ }
450
+ ]
451
+ },
452
+ "DependsOn": [
453
+ "VpcisolatedSubnet1RouteTableAssociationD259E31A",
454
+ "VpcisolatedSubnet2RouteTableAssociation25A4716F"
455
+ ]
456
+ },
457
+ "testfunction5B23D3B0": {
458
+ "Type": "AWS::Lambda::Function",
459
+ "Properties": {
460
+ "Code": {
461
+ "S3Bucket": {
462
+ "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
463
+ },
464
+ "S3Key": "c1b23d6af38c04acb744bda25a3dc7f4394daea942c67eaff40911a707a3c37a.zip"
465
+ },
466
+ "Environment": {
467
+ "Variables": {
468
+ "CACHE_ENDPOINT": {
469
+ "Fn::Join": [
470
+ "",
471
+ [
472
+ {
473
+ "Fn::GetAtt": [
474
+ "testcachecluster",
475
+ "ConfigurationEndpoint.Address"
476
+ ]
477
+ },
478
+ ":",
479
+ {
480
+ "Fn::GetAtt": [
481
+ "testcachecluster",
482
+ "ConfigurationEndpoint.Port"
483
+ ]
484
+ }
485
+ ]
486
+ ]
487
+ }
488
+ }
489
+ },
490
+ "Handler": "index.handler",
491
+ "Role": {
492
+ "Fn::GetAtt": [
493
+ "testfunctionServiceRoleFB85AD63",
494
+ "Arn"
495
+ ]
496
+ },
497
+ "Runtime": "nodejs16.x",
498
+ "VpcConfig": {
499
+ "SecurityGroupIds": [
500
+ {
501
+ "Fn::GetAtt": [
502
+ "testsgsecuritygroup89DCF621",
503
+ "GroupId"
504
+ ]
505
+ },
506
+ {
507
+ "Fn::GetAtt": [
508
+ "lammemexistingResourceslammemexistingResourcescachesg832A8E40",
509
+ "GroupId"
510
+ ]
511
+ }
512
+ ],
513
+ "SubnetIds": [
514
+ {
515
+ "Ref": "VpcisolatedSubnet1SubnetE62B1B9B"
516
+ },
517
+ {
518
+ "Ref": "VpcisolatedSubnet2Subnet39217055"
519
+ }
520
+ ]
521
+ }
522
+ },
523
+ "DependsOn": [
524
+ "testfunctionServiceRoleFB85AD63",
525
+ "VpcisolatedSubnet1RouteTableAssociationD259E31A",
526
+ "VpcisolatedSubnet2RouteTableAssociation25A4716F"
527
+ ],
528
+ "Metadata": {
529
+ "cfn_nag": {
530
+ "rules_to_suppress": [
531
+ {
532
+ "id": "W58",
533
+ "reason": "Test Resource"
534
+ },
535
+ {
536
+ "id": "W92",
537
+ "reason": "Test Resource"
538
+ }
539
+ ]
540
+ }
541
+ }
542
+ },
543
+ "ecsubnetgrouptestcache": {
544
+ "Type": "AWS::ElastiCache::SubnetGroup",
545
+ "Properties": {
546
+ "CacheSubnetGroupName": "test-cache-subnet-group",
547
+ "Description": "Solutions Constructs generated Cache Subnet Group",
548
+ "SubnetIds": [
549
+ {
550
+ "Ref": "VpcisolatedSubnet1SubnetE62B1B9B"
551
+ },
552
+ {
553
+ "Ref": "VpcisolatedSubnet2Subnet39217055"
554
+ }
555
+ ]
556
+ }
557
+ },
558
+ "testcachecachesg7265880E": {
559
+ "Type": "AWS::EC2::SecurityGroup",
560
+ "Properties": {
561
+ "GroupDescription": "lammem-existingResources/test-cache-cachesg",
562
+ "SecurityGroupEgress": [
563
+ {
564
+ "CidrIp": "0.0.0.0/0",
565
+ "Description": "Allow all outbound traffic by default",
566
+ "IpProtocol": "-1"
567
+ }
568
+ ],
569
+ "VpcId": {
570
+ "Ref": "Vpc8378EB38"
571
+ }
572
+ },
573
+ "Metadata": {
574
+ "cfn_nag": {
575
+ "rules_to_suppress": [
576
+ {
577
+ "id": "W40",
578
+ "reason": "Test Resource"
579
+ },
580
+ {
581
+ "id": "W5",
582
+ "reason": "Test Resource"
583
+ },
584
+ {
585
+ "id": "W36",
586
+ "reason": "Test Resource"
587
+ }
588
+ ]
589
+ }
590
+ }
591
+ },
592
+ "testcachecluster": {
593
+ "Type": "AWS::ElastiCache::CacheCluster",
594
+ "Properties": {
595
+ "AZMode": "cross-az",
596
+ "CacheNodeType": "cache.t3.medium",
597
+ "CacheSubnetGroupName": "test-cache-subnet-group",
598
+ "ClusterName": "test-cache-cdk-cluster",
599
+ "Engine": "memcached",
600
+ "NumCacheNodes": 2,
601
+ "Port": 11222,
602
+ "VpcSecurityGroupIds": [
603
+ {
604
+ "Fn::GetAtt": [
605
+ "testcachecachesg7265880E",
606
+ "GroupId"
607
+ ]
608
+ },
609
+ {
610
+ "Fn::GetAtt": [
611
+ "lammemexistingResourceslammemexistingResourcescachesg832A8E40",
612
+ "GroupId"
613
+ ]
614
+ }
615
+ ]
616
+ },
617
+ "DependsOn": [
618
+ "ecsubnetgrouptestcache"
619
+ ]
620
+ },
621
+ "lammemexistingResourceslammemexistingResourcescachesg832A8E40": {
622
+ "Type": "AWS::EC2::SecurityGroup",
623
+ "Properties": {
624
+ "GroupDescription": "lammem-existingResources/lammem-existingResources/lammem-existingResources-cachesg",
625
+ "SecurityGroupEgress": [
626
+ {
627
+ "CidrIp": "0.0.0.0/0",
628
+ "Description": "Allow all outbound traffic by default",
629
+ "IpProtocol": "-1"
630
+ }
631
+ ],
632
+ "VpcId": {
633
+ "Ref": "Vpc8378EB38"
634
+ }
635
+ },
636
+ "Metadata": {
637
+ "cfn_nag": {
638
+ "rules_to_suppress": [
639
+ {
640
+ "id": "W5",
641
+ "reason": "Egress of 0.0.0.0/0 is default and generally considered OK"
642
+ },
643
+ {
644
+ "id": "W40",
645
+ "reason": "Egress IPProtocol of -1 is default and generally considered OK"
646
+ }
647
+ ]
648
+ }
649
+ }
650
+ },
651
+ "lammemexistingResourceslammemexistingResourcesingress225EA10E": {
652
+ "Type": "AWS::EC2::SecurityGroupIngress",
653
+ "Properties": {
654
+ "Description": "Self referencing rule to control access to Elasticache memcached cluster",
655
+ "FromPort": {
656
+ "Fn::GetAtt": [
657
+ "testcachecluster",
658
+ "ConfigurationEndpoint.Port"
659
+ ]
660
+ },
661
+ "GroupId": {
662
+ "Fn::GetAtt": [
663
+ "lammemexistingResourceslammemexistingResourcescachesg832A8E40",
664
+ "GroupId"
665
+ ]
666
+ },
667
+ "IpProtocol": "TCP",
668
+ "SourceSecurityGroupId": {
669
+ "Fn::GetAtt": [
670
+ "lammemexistingResourceslammemexistingResourcescachesg832A8E40",
671
+ "GroupId"
672
+ ]
673
+ },
674
+ "ToPort": {
675
+ "Fn::GetAtt": [
676
+ "testcachecluster",
677
+ "ConfigurationEndpoint.Port"
678
+ ]
679
+ }
680
+ },
681
+ "DependsOn": [
682
+ "lammemexistingResourceslammemexistingResourcescachesg832A8E40"
683
+ ]
684
+ }
685
+ },
686
+ "Parameters": {
687
+ "BootstrapVersion": {
688
+ "Type": "AWS::SSM::Parameter::Value<String>",
689
+ "Default": "/cdk-bootstrap/hnb659fds/version",
690
+ "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
691
+ }
692
+ },
693
+ "Rules": {
694
+ "CheckBootstrapVersion": {
695
+ "Assertions": [
696
+ {
697
+ "Assert": {
698
+ "Fn::Not": [
699
+ {
700
+ "Fn::Contains": [
701
+ [
702
+ "1",
703
+ "2",
704
+ "3",
705
+ "4",
706
+ "5"
707
+ ],
708
+ {
709
+ "Ref": "BootstrapVersion"
710
+ }
711
+ ]
712
+ }
713
+ ]
714
+ },
715
+ "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
716
+ }
717
+ ]
718
+ }
719
+ }
720
+ }