-
Notifications
You must be signed in to change notification settings - Fork 272
/
Copy pathtemplate.yaml
704 lines (703 loc) · 22.1 KB
/
template.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
Resources:
Vpc8378EB38:
Type: AWS::EC2::VPC
Properties:
CidrBlock: 10.0.0.0/16
EnableDnsHostnames: true
EnableDnsSupport: true
InstanceTenancy: default
Tags:
- Key: Name
Value: TheRdsProxyStack/Vpc
Metadata:
aws:cdk:path: TheRdsProxyStack/Vpc/Resource
VpcPublicSubnet1Subnet5C2D37C4:
Type: AWS::EC2::Subnet
Properties:
CidrBlock: 10.0.0.0/18
VpcId:
Ref: Vpc8378EB38
AvailabilityZone:
Fn::Select:
- 0
- Fn::GetAZs: ""
MapPublicIpOnLaunch: true
Tags:
- Key: aws-cdk:subnet-name
Value: Public
- Key: aws-cdk:subnet-type
Value: Public
- Key: Name
Value: TheRdsProxyStack/Vpc/PublicSubnet1
Metadata:
aws:cdk:path: TheRdsProxyStack/Vpc/PublicSubnet1/Subnet
VpcPublicSubnet1RouteTable6C95E38E:
Type: AWS::EC2::RouteTable
Properties:
VpcId:
Ref: Vpc8378EB38
Tags:
- Key: Name
Value: TheRdsProxyStack/Vpc/PublicSubnet1
Metadata:
aws:cdk:path: TheRdsProxyStack/Vpc/PublicSubnet1/RouteTable
VpcPublicSubnet1RouteTableAssociation97140677:
Type: AWS::EC2::SubnetRouteTableAssociation
Properties:
RouteTableId:
Ref: VpcPublicSubnet1RouteTable6C95E38E
SubnetId:
Ref: VpcPublicSubnet1Subnet5C2D37C4
Metadata:
aws:cdk:path: TheRdsProxyStack/Vpc/PublicSubnet1/RouteTableAssociation
VpcPublicSubnet1DefaultRoute3DA9E72A:
Type: AWS::EC2::Route
Properties:
RouteTableId:
Ref: VpcPublicSubnet1RouteTable6C95E38E
DestinationCidrBlock: 0.0.0.0/0
GatewayId:
Ref: VpcIGWD7BA715C
DependsOn:
- VpcVPCGWBF912B6E
Metadata:
aws:cdk:path: TheRdsProxyStack/Vpc/PublicSubnet1/DefaultRoute
VpcPublicSubnet1EIPD7E02669:
Type: AWS::EC2::EIP
Properties:
Domain: vpc
Tags:
- Key: Name
Value: TheRdsProxyStack/Vpc/PublicSubnet1
Metadata:
aws:cdk:path: TheRdsProxyStack/Vpc/PublicSubnet1/EIP
VpcPublicSubnet1NATGateway4D7517AA:
Type: AWS::EC2::NatGateway
Properties:
AllocationId:
Fn::GetAtt:
- VpcPublicSubnet1EIPD7E02669
- AllocationId
SubnetId:
Ref: VpcPublicSubnet1Subnet5C2D37C4
Tags:
- Key: Name
Value: TheRdsProxyStack/Vpc/PublicSubnet1
Metadata:
aws:cdk:path: TheRdsProxyStack/Vpc/PublicSubnet1/NATGateway
VpcPublicSubnet2Subnet691E08A3:
Type: AWS::EC2::Subnet
Properties:
CidrBlock: 10.0.64.0/18
VpcId:
Ref: Vpc8378EB38
AvailabilityZone:
Fn::Select:
- 1
- Fn::GetAZs: ""
MapPublicIpOnLaunch: true
Tags:
- Key: aws-cdk:subnet-name
Value: Public
- Key: aws-cdk:subnet-type
Value: Public
- Key: Name
Value: TheRdsProxyStack/Vpc/PublicSubnet2
Metadata:
aws:cdk:path: TheRdsProxyStack/Vpc/PublicSubnet2/Subnet
VpcPublicSubnet2RouteTable94F7E489:
Type: AWS::EC2::RouteTable
Properties:
VpcId:
Ref: Vpc8378EB38
Tags:
- Key: Name
Value: TheRdsProxyStack/Vpc/PublicSubnet2
Metadata:
aws:cdk:path: TheRdsProxyStack/Vpc/PublicSubnet2/RouteTable
VpcPublicSubnet2RouteTableAssociationDD5762D8:
Type: AWS::EC2::SubnetRouteTableAssociation
Properties:
RouteTableId:
Ref: VpcPublicSubnet2RouteTable94F7E489
SubnetId:
Ref: VpcPublicSubnet2Subnet691E08A3
Metadata:
aws:cdk:path: TheRdsProxyStack/Vpc/PublicSubnet2/RouteTableAssociation
VpcPublicSubnet2DefaultRoute97F91067:
Type: AWS::EC2::Route
Properties:
RouteTableId:
Ref: VpcPublicSubnet2RouteTable94F7E489
DestinationCidrBlock: 0.0.0.0/0
GatewayId:
Ref: VpcIGWD7BA715C
DependsOn:
- VpcVPCGWBF912B6E
Metadata:
aws:cdk:path: TheRdsProxyStack/Vpc/PublicSubnet2/DefaultRoute
VpcPublicSubnet2EIP3C605A87:
Type: AWS::EC2::EIP
Properties:
Domain: vpc
Tags:
- Key: Name
Value: TheRdsProxyStack/Vpc/PublicSubnet2
Metadata:
aws:cdk:path: TheRdsProxyStack/Vpc/PublicSubnet2/EIP
VpcPublicSubnet2NATGateway9182C01D:
Type: AWS::EC2::NatGateway
Properties:
AllocationId:
Fn::GetAtt:
- VpcPublicSubnet2EIP3C605A87
- AllocationId
SubnetId:
Ref: VpcPublicSubnet2Subnet691E08A3
Tags:
- Key: Name
Value: TheRdsProxyStack/Vpc/PublicSubnet2
Metadata:
aws:cdk:path: TheRdsProxyStack/Vpc/PublicSubnet2/NATGateway
VpcPrivateSubnet1Subnet536B997A:
Type: AWS::EC2::Subnet
Properties:
CidrBlock: 10.0.128.0/18
VpcId:
Ref: Vpc8378EB38
AvailabilityZone:
Fn::Select:
- 0
- Fn::GetAZs: ""
MapPublicIpOnLaunch: false
Tags:
- Key: aws-cdk:subnet-name
Value: Private
- Key: aws-cdk:subnet-type
Value: Private
- Key: Name
Value: TheRdsProxyStack/Vpc/PrivateSubnet1
Metadata:
aws:cdk:path: TheRdsProxyStack/Vpc/PrivateSubnet1/Subnet
VpcPrivateSubnet1RouteTableB2C5B500:
Type: AWS::EC2::RouteTable
Properties:
VpcId:
Ref: Vpc8378EB38
Tags:
- Key: Name
Value: TheRdsProxyStack/Vpc/PrivateSubnet1
Metadata:
aws:cdk:path: TheRdsProxyStack/Vpc/PrivateSubnet1/RouteTable
VpcPrivateSubnet1RouteTableAssociation70C59FA6:
Type: AWS::EC2::SubnetRouteTableAssociation
Properties:
RouteTableId:
Ref: VpcPrivateSubnet1RouteTableB2C5B500
SubnetId:
Ref: VpcPrivateSubnet1Subnet536B997A
Metadata:
aws:cdk:path: TheRdsProxyStack/Vpc/PrivateSubnet1/RouteTableAssociation
VpcPrivateSubnet1DefaultRouteBE02A9ED:
Type: AWS::EC2::Route
Properties:
RouteTableId:
Ref: VpcPrivateSubnet1RouteTableB2C5B500
DestinationCidrBlock: 0.0.0.0/0
NatGatewayId:
Ref: VpcPublicSubnet1NATGateway4D7517AA
Metadata:
aws:cdk:path: TheRdsProxyStack/Vpc/PrivateSubnet1/DefaultRoute
VpcPrivateSubnet2Subnet3788AAA1:
Type: AWS::EC2::Subnet
Properties:
CidrBlock: 10.0.192.0/18
VpcId:
Ref: Vpc8378EB38
AvailabilityZone:
Fn::Select:
- 1
- Fn::GetAZs: ""
MapPublicIpOnLaunch: false
Tags:
- Key: aws-cdk:subnet-name
Value: Private
- Key: aws-cdk:subnet-type
Value: Private
- Key: Name
Value: TheRdsProxyStack/Vpc/PrivateSubnet2
Metadata:
aws:cdk:path: TheRdsProxyStack/Vpc/PrivateSubnet2/Subnet
VpcPrivateSubnet2RouteTableA678073B:
Type: AWS::EC2::RouteTable
Properties:
VpcId:
Ref: Vpc8378EB38
Tags:
- Key: Name
Value: TheRdsProxyStack/Vpc/PrivateSubnet2
Metadata:
aws:cdk:path: TheRdsProxyStack/Vpc/PrivateSubnet2/RouteTable
VpcPrivateSubnet2RouteTableAssociationA89CAD56:
Type: AWS::EC2::SubnetRouteTableAssociation
Properties:
RouteTableId:
Ref: VpcPrivateSubnet2RouteTableA678073B
SubnetId:
Ref: VpcPrivateSubnet2Subnet3788AAA1
Metadata:
aws:cdk:path: TheRdsProxyStack/Vpc/PrivateSubnet2/RouteTableAssociation
VpcPrivateSubnet2DefaultRoute060D2087:
Type: AWS::EC2::Route
Properties:
RouteTableId:
Ref: VpcPrivateSubnet2RouteTableA678073B
DestinationCidrBlock: 0.0.0.0/0
NatGatewayId:
Ref: VpcPublicSubnet2NATGateway9182C01D
Metadata:
aws:cdk:path: TheRdsProxyStack/Vpc/PrivateSubnet2/DefaultRoute
VpcIGWD7BA715C:
Type: AWS::EC2::InternetGateway
Properties:
Tags:
- Key: Name
Value: TheRdsProxyStack/Vpc
Metadata:
aws:cdk:path: TheRdsProxyStack/Vpc/IGW
VpcVPCGWBF912B6E:
Type: AWS::EC2::VPCGatewayAttachment
Properties:
VpcId:
Ref: Vpc8378EB38
InternetGatewayId:
Ref: VpcIGWD7BA715C
Metadata:
aws:cdk:path: TheRdsProxyStack/Vpc/VPCGW
LambdatoRDSProxyConnectionB1057E7D:
Type: AWS::EC2::SecurityGroup
Properties:
GroupDescription: TheRdsProxyStack/Lambda to RDS Proxy Connection
SecurityGroupEgress:
- CidrIp: 0.0.0.0/0
Description: Allow all outbound traffic by default
IpProtocol: "-1"
VpcId:
Ref: Vpc8378EB38
Metadata:
aws:cdk:path: TheRdsProxyStack/Lambda to RDS Proxy Connection/Resource
ProxytoDBConnectionC580BD64:
Type: AWS::EC2::SecurityGroup
Properties:
GroupDescription: TheRdsProxyStack/Proxy to DB Connection
SecurityGroupEgress:
- CidrIp: 0.0.0.0/0
Description: Allow all outbound traffic by default
IpProtocol: "-1"
VpcId:
Ref: Vpc8378EB38
Metadata:
aws:cdk:path: TheRdsProxyStack/Proxy to DB Connection/Resource
ProxytoDBConnectionfromTheRdsProxyStackProxytoDBConnection6E4D01C8330630300FA6:
Type: AWS::EC2::SecurityGroupIngress
Properties:
IpProtocol: tcp
Description: allow db connection
FromPort: 3306
GroupId:
Fn::GetAtt:
- ProxytoDBConnectionC580BD64
- GroupId
SourceSecurityGroupId:
Fn::GetAtt:
- ProxytoDBConnectionC580BD64
- GroupId
ToPort: 3306
Metadata:
aws:cdk:path: TheRdsProxyStack/Proxy to DB Connection/from TheRdsProxyStackProxytoDBConnection6E4D01C8:3306
ProxytoDBConnectionfromTheRdsProxyStackLambdatoRDSProxyConnection02900188330689AFC3E4:
Type: AWS::EC2::SecurityGroupIngress
Properties:
IpProtocol: tcp
Description: allow lambda connection
FromPort: 3306
GroupId:
Fn::GetAtt:
- ProxytoDBConnectionC580BD64
- GroupId
SourceSecurityGroupId:
Fn::GetAtt:
- LambdatoRDSProxyConnectionB1057E7D
- GroupId
ToPort: 3306
Metadata:
aws:cdk:path: TheRdsProxyStack/Proxy to DB Connection/from TheRdsProxyStackLambdatoRDSProxyConnection02900188:3306
DBCredentialsSecretAFB45EA2:
Type: AWS::SecretsManager::Secret
Properties:
GenerateSecretString:
ExcludePunctuation: true
GenerateStringKey: password
IncludeSpace: false
SecretStringTemplate: '{"username":"syscdk"}'
Name: TheRdsProxyStack-rds-credentials
Metadata:
aws:cdk:path: TheRdsProxyStack/DBCredentialsSecret/Resource
DBCredentialsArn15122902:
Type: AWS::SSM::Parameter
Properties:
Type: String
Value:
Ref: DBCredentialsSecretAFB45EA2
Name: rds-credentials-arn
Metadata:
aws:cdk:path: TheRdsProxyStack/DBCredentialsArn/Resource
DBInstanceSubnetGroupF597B45B:
Type: AWS::RDS::DBSubnetGroup
Properties:
DBSubnetGroupDescription: Subnet group for DBInstance database
SubnetIds:
- Ref: VpcPrivateSubnet1Subnet536B997A
- Ref: VpcPrivateSubnet2Subnet3788AAA1
Metadata:
aws:cdk:path: TheRdsProxyStack/DBInstance/SubnetGroup
DBInstance46641A50:
Type: AWS::RDS::DBInstance
Properties:
DBInstanceClass: db.t2.small
AllocatedStorage: "100"
CopyTagsToSnapshot: true
DBSubnetGroupName:
Ref: DBInstanceSubnetGroupF597B45B
DeletionProtection: false
Engine: mysql
MasterUsername:
Fn::Join:
- ""
- - "{{resolve:secretsmanager:"
- Ref: DBCredentialsSecretAFB45EA2
- :SecretString:username::}}
MasterUserPassword:
Fn::Join:
- ""
- - "{{resolve:secretsmanager:"
- Ref: DBCredentialsSecretAFB45EA2
- :SecretString:password::}}
StorageType: gp2
VPCSecurityGroups:
- Fn::GetAtt:
- ProxytoDBConnectionC580BD64
- GroupId
UpdateReplacePolicy: Delete
DeletionPolicy: Delete
Metadata:
aws:cdk:path: TheRdsProxyStack/DBInstance/Resource
DBInstanceTheRdsProxyStackproxyIAMRole1B7DD1AC:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument:
Statement:
- Action: sts:AssumeRole
Effect: Allow
Principal:
Service: rds.amazonaws.com
Version: "2012-10-17"
Metadata:
aws:cdk:path: TheRdsProxyStack/DBInstance/TheRdsProxyStack-proxy/IAMRole/Resource
DBInstanceTheRdsProxyStackproxyIAMRoleDefaultPolicyF4686A74:
Type: AWS::IAM::Policy
Properties:
PolicyDocument:
Statement:
- Action:
- secretsmanager:GetSecretValue
- secretsmanager:DescribeSecret
Effect: Allow
Resource:
Ref: DBCredentialsSecretAFB45EA2
Version: "2012-10-17"
PolicyName: DBInstanceTheRdsProxyStackproxyIAMRoleDefaultPolicyF4686A74
Roles:
- Ref: DBInstanceTheRdsProxyStackproxyIAMRole1B7DD1AC
Metadata:
aws:cdk:path: TheRdsProxyStack/DBInstance/TheRdsProxyStack-proxy/IAMRole/DefaultPolicy/Resource
DBInstanceTheRdsProxyStackproxyB547C4DB:
Type: AWS::RDS::DBProxy
Properties:
Auth:
- AuthScheme: SECRETS
IAMAuth: DISABLED
SecretArn:
Ref: DBCredentialsSecretAFB45EA2
DBProxyName: TheRdsProxyStack-proxy
EngineFamily: MYSQL
RoleArn:
Fn::GetAtt:
- DBInstanceTheRdsProxyStackproxyIAMRole1B7DD1AC
- Arn
VpcSubnetIds:
- Ref: VpcPrivateSubnet1Subnet536B997A
- Ref: VpcPrivateSubnet2Subnet3788AAA1
DebugLogging: true
RequireTLS: true
VpcSecurityGroupIds:
- Fn::GetAtt:
- ProxytoDBConnectionC580BD64
- GroupId
Metadata:
aws:cdk:path: TheRdsProxyStack/DBInstance/TheRdsProxyStack-proxy/Resource
DBInstanceTheRdsProxyStackproxyProxyTargetGroup088E81EF:
Type: AWS::RDS::DBProxyTargetGroup
Properties:
DBProxyName:
Ref: DBInstanceTheRdsProxyStackproxyB547C4DB
ConnectionPoolConfigurationInfo: {}
DBInstanceIdentifiers:
- Ref: DBInstance46641A50
TargetGroupName: default
Metadata:
aws:cdk:path: TheRdsProxyStack/DBInstance/TheRdsProxyStack-proxy/ProxyTargetGroup
rdsProxyHandlerServiceRoleD70E0A19:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument:
Statement:
- Action: sts:AssumeRole
Effect: Allow
Principal:
Service: lambda.amazonaws.com
Version: "2012-10-17"
ManagedPolicyArns:
- Fn::Join:
- ""
- - "arn:"
- Ref: AWS::Partition
- :iam::aws:policy/service-role/AWSLambdaBasicExecutionRole
- Fn::Join:
- ""
- - "arn:"
- Ref: AWS::Partition
- :iam::aws:policy/service-role/AWSLambdaVPCAccessExecutionRole
Metadata:
aws:cdk:path: TheRdsProxyStack/rdsProxyHandler/ServiceRole/Resource
rdsProxyHandlerServiceRoleDefaultPolicyEFCE83C1:
Type: AWS::IAM::Policy
Properties:
PolicyDocument:
Statement:
- Action:
- secretsmanager:GetSecretValue
- secretsmanager:DescribeSecret
Effect: Allow
Resource:
Ref: DBCredentialsSecretAFB45EA2
Version: "2012-10-17"
PolicyName: rdsProxyHandlerServiceRoleDefaultPolicyEFCE83C1
Roles:
- Ref: rdsProxyHandlerServiceRoleD70E0A19
Metadata:
aws:cdk:path: TheRdsProxyStack/rdsProxyHandler/ServiceRole/DefaultPolicy/Resource
rdsProxyHandlerDA266FA9:
Type: AWS::Lambda::Function
Properties:
Code:
S3Bucket:
Ref: AssetParameters8915bffafc19a6bb10076f0450ead8774c22bdea272ecdc3e4742298560198e3S3BucketA37653ED
S3Key:
Fn::Join:
- ""
- - Fn::Select:
- 0
- Fn::Split:
- "||"
- Ref: AssetParameters8915bffafc19a6bb10076f0450ead8774c22bdea272ecdc3e4742298560198e3S3VersionKey0028895D
- Fn::Select:
- 1
- Fn::Split:
- "||"
- Ref: AssetParameters8915bffafc19a6bb10076f0450ead8774c22bdea272ecdc3e4742298560198e3S3VersionKey0028895D
Handler: rdsLambda.handler
Role:
Fn::GetAtt:
- rdsProxyHandlerServiceRoleD70E0A19
- Arn
Runtime: nodejs12.x
Environment:
Variables:
PROXY_ENDPOINT:
Fn::GetAtt:
- DBInstanceTheRdsProxyStackproxyB547C4DB
- Endpoint
RDS_SECRET_NAME: TheRdsProxyStack-rds-credentials
VpcConfig:
SecurityGroupIds:
- Fn::GetAtt:
- LambdatoRDSProxyConnectionB1057E7D
- GroupId
SubnetIds:
- Ref: VpcPrivateSubnet1Subnet536B997A
- Ref: VpcPrivateSubnet2Subnet3788AAA1
DependsOn:
- rdsProxyHandlerServiceRoleDefaultPolicyEFCE83C1
- rdsProxyHandlerServiceRoleD70E0A19
Metadata:
aws:cdk:path: TheRdsProxyStack/rdsProxyHandler/Resource
aws:asset:path: asset.8915bffafc19a6bb10076f0450ead8774c22bdea272ecdc3e4742298560198e3
aws:asset:property: Code
rdsProxyHandlerTheRdsProxyStackEndpointDefaultRoute8ABE1209Permission3E645210:
Type: AWS::Lambda::Permission
Properties:
Action: lambda:InvokeFunction
FunctionName:
Fn::GetAtt:
- rdsProxyHandlerDA266FA9
- Arn
Principal: apigateway.amazonaws.com
SourceArn:
Fn::Join:
- ""
- - "arn:"
- Ref: AWS::Partition
- ":execute-api:"
- Ref: AWS::Region
- ":"
- Ref: AWS::AccountId
- ":"
- Ref: EndpointEEF1FD8F
- /*/*
Metadata:
aws:cdk:path: TheRdsProxyStack/rdsProxyHandler/TheRdsProxyStackEndpointDefaultRoute8ABE1209-Permission
EndpointEEF1FD8F:
Type: AWS::ApiGatewayV2::Api
Properties:
Name: Endpoint
ProtocolType: HTTP
Metadata:
aws:cdk:path: TheRdsProxyStack/Endpoint/Resource
EndpointDefaultRouteDefaultRouteIntegration4584A785:
Type: AWS::ApiGatewayV2::Integration
Properties:
ApiId:
Ref: EndpointEEF1FD8F
IntegrationType: AWS_PROXY
IntegrationUri:
Fn::GetAtt:
- rdsProxyHandlerDA266FA9
- Arn
PayloadFormatVersion: "2.0"
Metadata:
aws:cdk:path: TheRdsProxyStack/Endpoint/DefaultRoute/DefaultRoute-Integration/Resource
EndpointDefaultRouteB7B22F2B:
Type: AWS::ApiGatewayV2::Route
Properties:
ApiId:
Ref: EndpointEEF1FD8F
RouteKey: $default
Target:
Fn::Join:
- ""
- - integrations/
- Ref: EndpointDefaultRouteDefaultRouteIntegration4584A785
Metadata:
aws:cdk:path: TheRdsProxyStack/Endpoint/DefaultRoute/Resource
EndpointDefaultStage0AD21F27:
Type: AWS::ApiGatewayV2::Stage
Properties:
ApiId:
Ref: EndpointEEF1FD8F
StageName: $default
AutoDeploy: true
Metadata:
aws:cdk:path: TheRdsProxyStack/Endpoint/DefaultStage/Resource
CDKMetadata:
Type: AWS::CDK::Metadata
Properties:
Modules: aws-cdk=1.49.1,@aws-cdk/assets=1.49.1,@aws-cdk/aws-apigatewayv2=1.49.1,@aws-cdk/aws-cloudwatch=1.49.1,@aws-cdk/aws-ec2=1.49.1,@aws-cdk/aws-events=1.49.1,@aws-cdk/aws-iam=1.49.1,@aws-cdk/aws-kms=1.49.1,@aws-cdk/aws-lambda=1.49.1,@aws-cdk/aws-logs=1.49.1,@aws-cdk/aws-rds=1.49.1,@aws-cdk/aws-s3=1.49.1,@aws-cdk/aws-s3-assets=1.49.1,@aws-cdk/aws-sam=1.49.1,@aws-cdk/aws-secretsmanager=1.49.1,@aws-cdk/aws-sqs=1.49.1,@aws-cdk/aws-ssm=1.49.1,@aws-cdk/cloud-assembly-schema=1.49.1,@aws-cdk/core=1.49.1,@aws-cdk/cx-api=1.49.1,@aws-cdk/region-info=1.49.1,jsii-runtime=node.js/v13.12.0
Condition: CDKMetadataAvailable
Parameters:
AssetParameters8915bffafc19a6bb10076f0450ead8774c22bdea272ecdc3e4742298560198e3S3BucketA37653ED:
Type: String
Description: S3 bucket for asset "8915bffafc19a6bb10076f0450ead8774c22bdea272ecdc3e4742298560198e3"
AssetParameters8915bffafc19a6bb10076f0450ead8774c22bdea272ecdc3e4742298560198e3S3VersionKey0028895D:
Type: String
Description: S3 key for asset version "8915bffafc19a6bb10076f0450ead8774c22bdea272ecdc3e4742298560198e3"
AssetParameters8915bffafc19a6bb10076f0450ead8774c22bdea272ecdc3e4742298560198e3ArtifactHashF8941911:
Type: String
Description: Artifact hash for asset "8915bffafc19a6bb10076f0450ead8774c22bdea272ecdc3e4742298560198e3"
Outputs:
HTTPAPIUrl:
Value:
Fn::Join:
- ""
- - https://
- Ref: EndpointEEF1FD8F
- .execute-api.
- Ref: AWS::Region
- "."
- Ref: AWS::URLSuffix
- /
Conditions:
CDKMetadataAvailable:
Fn::Or:
- Fn::Or:
- Fn::Equals:
- Ref: AWS::Region
- ap-east-1
- Fn::Equals:
- Ref: AWS::Region
- ap-northeast-1
- Fn::Equals:
- Ref: AWS::Region
- ap-northeast-2
- Fn::Equals:
- Ref: AWS::Region
- ap-south-1
- Fn::Equals:
- Ref: AWS::Region
- ap-southeast-1
- Fn::Equals:
- Ref: AWS::Region
- ap-southeast-2
- Fn::Equals:
- Ref: AWS::Region
- ca-central-1
- Fn::Equals:
- Ref: AWS::Region
- cn-north-1
- Fn::Equals:
- Ref: AWS::Region
- cn-northwest-1
- Fn::Equals:
- Ref: AWS::Region
- eu-central-1
- Fn::Or:
- Fn::Equals:
- Ref: AWS::Region
- eu-north-1
- Fn::Equals:
- Ref: AWS::Region
- eu-west-1
- Fn::Equals:
- Ref: AWS::Region
- eu-west-2
- Fn::Equals:
- Ref: AWS::Region
- eu-west-3
- Fn::Equals:
- Ref: AWS::Region
- me-south-1
- Fn::Equals:
- Ref: AWS::Region
- sa-east-1
- Fn::Equals:
- Ref: AWS::Region
- us-east-1
- Fn::Equals:
- Ref: AWS::Region
- us-east-2
- Fn::Equals:
- Ref: AWS::Region
- us-west-1
- Fn::Equals:
- Ref: AWS::Region
- us-west-2