Skip to content

Commit 78f17bd

Browse files
nmussymazyu36
authored andcommitted
fix(apigateway): remove timeout upper bound max (aws#30547)
### Issue # (if applicable) Closes aws#30539. ### Reason for this change AWS , see [announcement](https://aws.amazon.com/about-aws/whats-new/2024/06/amazon-api-gateway-integration-timeout-limit-29-seconds/) and [Amazon API Gateway quotas](https://docs.aws.amazon.com/apigateway/latest/developerguide/limits.html) ### Description of changes * Updated exception of `apigateway` `Integration` to only check the `timeout` lower bound * Added exception check of the `timeout` prop to `apigateway-v2` `WebSocketIntegration`, to match the `apigateway` v1 behavior * Implemented the `timeout` property to `apigateway-v2` `HttpIntegration` and its sub-integrations (`HttpAlbIntegration`, `HttpLambdaIntegration`, etc.) * Updated TSDoc ### Description of how you validated changes Updated unit and integration tests ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 5865d0b commit 78f17bd

35 files changed

+65118
-493
lines changed

packages/@aws-cdk-testing/framework-integ/test/aws-apigatewayv2-integrations/test/http/integ.alb.js.snapshot/asset.3cef2cdbb46b3821e641ffb8b9af9731af5f7e4a9e857ab633dbcd9023de724d.bundle/index.js

+31,546
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-apigatewayv2-integrations/test/http/integ.alb.js.snapshot/cdk.out

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-apigatewayv2-integrations/test/http/integ.alb.js.snapshot/integ-alb-integration.assets.json

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-apigatewayv2-integrations/test/http/integ.alb.js.snapshot/integ-alb-integration.template.json

+66-79
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@
1818
"VPCPublicSubnet1SubnetB4246D30": {
1919
"Type": "AWS::EC2::Subnet",
2020
"Properties": {
21-
"VpcId": {
22-
"Ref": "VPCB9E5F0B4"
23-
},
2421
"AvailabilityZone": {
2522
"Fn::Select": [
2623
0,
@@ -44,21 +41,24 @@
4441
"Key": "Name",
4542
"Value": "integ-alb-integration/VPC/PublicSubnet1"
4643
}
47-
]
44+
],
45+
"VpcId": {
46+
"Ref": "VPCB9E5F0B4"
47+
}
4848
}
4949
},
5050
"VPCPublicSubnet1RouteTableFEE4B781": {
5151
"Type": "AWS::EC2::RouteTable",
5252
"Properties": {
53-
"VpcId": {
54-
"Ref": "VPCB9E5F0B4"
55-
},
5653
"Tags": [
5754
{
5855
"Key": "Name",
5956
"Value": "integ-alb-integration/VPC/PublicSubnet1"
6057
}
61-
]
58+
],
59+
"VpcId": {
60+
"Ref": "VPCB9E5F0B4"
61+
}
6262
}
6363
},
6464
"VPCPublicSubnet1RouteTableAssociation0B0896DC": {
@@ -75,12 +75,12 @@
7575
"VPCPublicSubnet1DefaultRoute91CEF279": {
7676
"Type": "AWS::EC2::Route",
7777
"Properties": {
78-
"RouteTableId": {
79-
"Ref": "VPCPublicSubnet1RouteTableFEE4B781"
80-
},
8178
"DestinationCidrBlock": "0.0.0.0/0",
8279
"GatewayId": {
8380
"Ref": "VPCIGWB7E252D3"
81+
},
82+
"RouteTableId": {
83+
"Ref": "VPCPublicSubnet1RouteTableFEE4B781"
8484
}
8585
},
8686
"DependsOn": [
@@ -102,15 +102,15 @@
102102
"VPCPublicSubnet1NATGatewayE0556630": {
103103
"Type": "AWS::EC2::NatGateway",
104104
"Properties": {
105-
"SubnetId": {
106-
"Ref": "VPCPublicSubnet1SubnetB4246D30"
107-
},
108105
"AllocationId": {
109106
"Fn::GetAtt": [
110107
"VPCPublicSubnet1EIP6AD938E8",
111108
"AllocationId"
112109
]
113110
},
111+
"SubnetId": {
112+
"Ref": "VPCPublicSubnet1SubnetB4246D30"
113+
},
114114
"Tags": [
115115
{
116116
"Key": "Name",
@@ -126,9 +126,6 @@
126126
"VPCPublicSubnet2Subnet74179F39": {
127127
"Type": "AWS::EC2::Subnet",
128128
"Properties": {
129-
"VpcId": {
130-
"Ref": "VPCB9E5F0B4"
131-
},
132129
"AvailabilityZone": {
133130
"Fn::Select": [
134131
1,
@@ -152,21 +149,24 @@
152149
"Key": "Name",
153150
"Value": "integ-alb-integration/VPC/PublicSubnet2"
154151
}
155-
]
152+
],
153+
"VpcId": {
154+
"Ref": "VPCB9E5F0B4"
155+
}
156156
}
157157
},
158158
"VPCPublicSubnet2RouteTable6F1A15F1": {
159159
"Type": "AWS::EC2::RouteTable",
160160
"Properties": {
161-
"VpcId": {
162-
"Ref": "VPCB9E5F0B4"
163-
},
164161
"Tags": [
165162
{
166163
"Key": "Name",
167164
"Value": "integ-alb-integration/VPC/PublicSubnet2"
168165
}
169-
]
166+
],
167+
"VpcId": {
168+
"Ref": "VPCB9E5F0B4"
169+
}
170170
}
171171
},
172172
"VPCPublicSubnet2RouteTableAssociation5A808732": {
@@ -183,12 +183,12 @@
183183
"VPCPublicSubnet2DefaultRouteB7481BBA": {
184184
"Type": "AWS::EC2::Route",
185185
"Properties": {
186-
"RouteTableId": {
187-
"Ref": "VPCPublicSubnet2RouteTable6F1A15F1"
188-
},
189186
"DestinationCidrBlock": "0.0.0.0/0",
190187
"GatewayId": {
191188
"Ref": "VPCIGWB7E252D3"
189+
},
190+
"RouteTableId": {
191+
"Ref": "VPCPublicSubnet2RouteTable6F1A15F1"
192192
}
193193
},
194194
"DependsOn": [
@@ -210,15 +210,15 @@
210210
"VPCPublicSubnet2NATGateway3C070193": {
211211
"Type": "AWS::EC2::NatGateway",
212212
"Properties": {
213-
"SubnetId": {
214-
"Ref": "VPCPublicSubnet2Subnet74179F39"
215-
},
216213
"AllocationId": {
217214
"Fn::GetAtt": [
218215
"VPCPublicSubnet2EIP4947BC00",
219216
"AllocationId"
220217
]
221218
},
219+
"SubnetId": {
220+
"Ref": "VPCPublicSubnet2Subnet74179F39"
221+
},
222222
"Tags": [
223223
{
224224
"Key": "Name",
@@ -234,9 +234,6 @@
234234
"VPCPrivateSubnet1Subnet8BCA10E0": {
235235
"Type": "AWS::EC2::Subnet",
236236
"Properties": {
237-
"VpcId": {
238-
"Ref": "VPCB9E5F0B4"
239-
},
240237
"AvailabilityZone": {
241238
"Fn::Select": [
242239
0,
@@ -260,21 +257,24 @@
260257
"Key": "Name",
261258
"Value": "integ-alb-integration/VPC/PrivateSubnet1"
262259
}
263-
]
260+
],
261+
"VpcId": {
262+
"Ref": "VPCB9E5F0B4"
263+
}
264264
}
265265
},
266266
"VPCPrivateSubnet1RouteTableBE8A6027": {
267267
"Type": "AWS::EC2::RouteTable",
268268
"Properties": {
269-
"VpcId": {
270-
"Ref": "VPCB9E5F0B4"
271-
},
272269
"Tags": [
273270
{
274271
"Key": "Name",
275272
"Value": "integ-alb-integration/VPC/PrivateSubnet1"
276273
}
277-
]
274+
],
275+
"VpcId": {
276+
"Ref": "VPCB9E5F0B4"
277+
}
278278
}
279279
},
280280
"VPCPrivateSubnet1RouteTableAssociation347902D1": {
@@ -291,21 +291,18 @@
291291
"VPCPrivateSubnet1DefaultRouteAE1D6490": {
292292
"Type": "AWS::EC2::Route",
293293
"Properties": {
294-
"RouteTableId": {
295-
"Ref": "VPCPrivateSubnet1RouteTableBE8A6027"
296-
},
297294
"DestinationCidrBlock": "0.0.0.0/0",
298295
"NatGatewayId": {
299296
"Ref": "VPCPublicSubnet1NATGatewayE0556630"
297+
},
298+
"RouteTableId": {
299+
"Ref": "VPCPrivateSubnet1RouteTableBE8A6027"
300300
}
301301
}
302302
},
303303
"VPCPrivateSubnet2SubnetCFCDAA7A": {
304304
"Type": "AWS::EC2::Subnet",
305305
"Properties": {
306-
"VpcId": {
307-
"Ref": "VPCB9E5F0B4"
308-
},
309306
"AvailabilityZone": {
310307
"Fn::Select": [
311308
1,
@@ -329,21 +326,24 @@
329326
"Key": "Name",
330327
"Value": "integ-alb-integration/VPC/PrivateSubnet2"
331328
}
332-
]
329+
],
330+
"VpcId": {
331+
"Ref": "VPCB9E5F0B4"
332+
}
333333
}
334334
},
335335
"VPCPrivateSubnet2RouteTable0A19E10E": {
336336
"Type": "AWS::EC2::RouteTable",
337337
"Properties": {
338-
"VpcId": {
339-
"Ref": "VPCB9E5F0B4"
340-
},
341338
"Tags": [
342339
{
343340
"Key": "Name",
344341
"Value": "integ-alb-integration/VPC/PrivateSubnet2"
345342
}
346-
]
343+
],
344+
"VpcId": {
345+
"Ref": "VPCB9E5F0B4"
346+
}
347347
}
348348
},
349349
"VPCPrivateSubnet2RouteTableAssociation0C73D413": {
@@ -360,12 +360,12 @@
360360
"VPCPrivateSubnet2DefaultRouteF4F5CFD2": {
361361
"Type": "AWS::EC2::Route",
362362
"Properties": {
363-
"RouteTableId": {
364-
"Ref": "VPCPrivateSubnet2RouteTable0A19E10E"
365-
},
366363
"DestinationCidrBlock": "0.0.0.0/0",
367364
"NatGatewayId": {
368365
"Ref": "VPCPublicSubnet2NATGateway3C070193"
366+
},
367+
"RouteTableId": {
368+
"Ref": "VPCPrivateSubnet2RouteTable0A19E10E"
369369
}
370370
}
371371
},
@@ -383,11 +383,11 @@
383383
"VPCVPCGW99B986DC": {
384384
"Type": "AWS::EC2::VPCGatewayAttachment",
385385
"Properties": {
386-
"VpcId": {
387-
"Ref": "VPCB9E5F0B4"
388-
},
389386
"InternetGatewayId": {
390387
"Ref": "VPCIGWB7E252D3"
388+
},
389+
"VpcId": {
390+
"Ref": "VPCB9E5F0B4"
391391
}
392392
}
393393
},
@@ -494,16 +494,17 @@
494494
"ApiId": {
495495
"Ref": "HttpProxyPrivateApiA55E154D"
496496
},
497-
"IntegrationType": "HTTP_PROXY",
498497
"ConnectionId": {
499498
"Ref": "HttpProxyPrivateApiVpcLink190366CAE"
500499
},
501500
"ConnectionType": "VPC_LINK",
502501
"IntegrationMethod": "ANY",
502+
"IntegrationType": "HTTP_PROXY",
503503
"IntegrationUri": {
504504
"Ref": "lblistener657ADDEC"
505505
},
506-
"PayloadFormatVersion": "1.0"
506+
"PayloadFormatVersion": "1.0",
507+
"TimeoutInMillis": 20000
507508
}
508509
},
509510
"HttpProxyPrivateApiDefaultRoute1BDCA252": {
@@ -512,8 +513,8 @@
512513
"ApiId": {
513514
"Ref": "HttpProxyPrivateApiA55E154D"
514515
},
515-
"RouteKey": "$default",
516516
"AuthorizationType": "NONE",
517+
"RouteKey": "$default",
517518
"Target": {
518519
"Fn::Join": [
519520
"",
@@ -531,15 +532,15 @@
531532
"Type": "AWS::ApiGatewayV2::VpcLink",
532533
"Properties": {
533534
"Name": "integalbintegrationHttpProxyPrivateApiVpcLink125175F29",
535+
"SecurityGroupIds": [],
534536
"SubnetIds": [
535537
{
536538
"Ref": "VPCPrivateSubnet1Subnet8BCA10E0"
537539
},
538540
{
539541
"Ref": "VPCPrivateSubnet2SubnetCFCDAA7A"
540542
}
541-
],
542-
"SecurityGroupIds": []
543+
]
543544
}
544545
},
545546
"HttpProxyPrivateApiDefaultStage18B3706E": {
@@ -548,32 +549,18 @@
548549
"ApiId": {
549550
"Ref": "HttpProxyPrivateApiA55E154D"
550551
},
551-
"StageName": "$default",
552-
"AutoDeploy": true
552+
"AutoDeploy": true,
553+
"StageName": "$default"
553554
}
554555
}
555556
},
556557
"Outputs": {
557-
"Endpoint": {
558+
"ExportsOutputRefHttpProxyPrivateApiA55E154DBF80C6A7": {
558559
"Value": {
559-
"Fn::Join": [
560-
"",
561-
[
562-
"https://",
563-
{
564-
"Ref": "HttpProxyPrivateApiA55E154D"
565-
},
566-
".execute-api.",
567-
{
568-
"Ref": "AWS::Region"
569-
},
570-
".",
571-
{
572-
"Ref": "AWS::URLSuffix"
573-
},
574-
"/"
575-
]
576-
]
560+
"Ref": "HttpProxyPrivateApiA55E154D"
561+
},
562+
"Export": {
563+
"Name": "integ-alb-integration:ExportsOutputRefHttpProxyPrivateApiA55E154DBF80C6A7"
577564
}
578565
}
579566
},

0 commit comments

Comments
 (0)