Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(apigateway): support integration timeout >29 seconds #30550

Closed
awsdataarchitect opened this issue Jun 13, 2024 · 6 comments
Closed

(apigateway): support integration timeout >29 seconds #30550

awsdataarchitect opened this issue Jun 13, 2024 · 6 comments
Labels
@aws-cdk/aws-apigateway Related to Amazon API Gateway bug This issue is a bug. effort/medium Medium work item – several days of effort p2

Comments

@awsdataarchitect
Copy link

Describe the bug

API Gateway now supports integration timeout greater than 29 seconds as released here.

This PR #14154 added a hard limit of 29000 milliseconds, so we need to remove that.

Expected Behavior

To be able to specify a value greater than 29 seconds from CDK

Current Behavior

Error: Integration timeout must be between 50 milliseconds and 29 seconds.
at new Integration (../node_modules/aws-cdk-lib/aws-apigateway/lib/integration.js:1:1439)
at new AwsIntegration (../node_modules/aws-cdk-lib/aws-apigateway/lib/integrations/aws.js:1:1140)
at new LambdaIntegration (../node_modules/aws-cdk-lib/aws-apigateway/lib/integrations/lambda.js:1:979)
at new CdkApiTimeoutDemoStack (../lib/cdk-api-timeout-demo-stack.ts:28:43)
at Object. (../bin/cdk-api-timeout-demo.ts:7:1)
at Module._compile (node:internal/modules/cjs/loader:1376:14)
at Module.m._compile (../node_modules/ts-node/src/index.ts:1618:23)
at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
at Object.require.extensions. [as .ts] (../node_modules/ts-node/src/index.ts:1621:12)
at Module.load (node:internal/modules/cjs/loader:1207:32)

Subprocess exited with error 1

Reproduction Steps

// Integrate the Lambda function with the API Gateway
const getImageProcessingIntegration = new apigateway.LambdaIntegration(imageProcessor, {
requestTemplates: { 'application/json': '{ "statusCode": "200" }' },
timeout: cdk.Duration.seconds(35), // This throws Error: Integration timeout must be between 50 milliseconds and 29 seconds.
integrationResponses: [
{
statusCode: '200',
responseTemplates: {
'application/json': ''
}
}
]
});

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.145.0 (build fdf53ba)

Framework Version

No response

Node.js Version

v20.11.0

OS

macOS 14.4 Beta (23E5196e)

Language

TypeScript

Language Version

No response

Other information

No response

@awsdataarchitect awsdataarchitect added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jun 13, 2024
@github-actions github-actions bot added the @aws-cdk/aws-apigateway Related to Amazon API Gateway label Jun 13, 2024
@ashishdhingra
Copy link
Contributor

@awsdataarchitect Thanks for reporting the issue. Looks like it is similar to existing issue #30539. Please verify if that is the case, then we could close this issue since are other one has associated PR already drafted.

Thanks,
Ashish

@ashishdhingra ashishdhingra added response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. and removed needs-triage This issue or PR still needs to be triaged. labels Jun 13, 2024
@awsdataarchitect
Copy link
Author

awsdataarchitect commented Jun 14, 2024

@awsdataarchitect Thanks for reporting the issue. Looks like it is similar to existing issue #30539. Please verify if that is the case, then we could close this issue since are other one has associated PR already drafted.

Thanks,

Ashish

This one is for http integration allowMethods: [HttpMethod.POST], after reviewing the pull request it's making change for apigatewayv2 and apigateway but the http and websocket limits are still hard limit of 29 seconds

@github-actions github-actions bot removed the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Jun 14, 2024
@ashishdhingra ashishdhingra added p2 effort/medium Medium work item – several days of effort labels Jun 14, 2024
@ashishdhingra
Copy link
Contributor

ashishdhingra commented Jun 14, 2024

@awsdataarchitect Thank you for sharing the update. Great to hear that. Yes we need a PR to unblock the limit, before that, you can use escape hatches to override TimeoutInMillis to work it around. I am not pretty sure if it would work because per CFN doc of this property: Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds or 29 seconds. Looks like this property still has the limit of 29 seconds. Please let me know if it works for you.

Kindly refer Using escape hatches for more details.

Thanks,
Ashish

@pahud
Copy link
Contributor

pahud commented Jun 19, 2024

closed by #30547

@pahud pahud closed this as completed Jun 19, 2024
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@aws-cdk-automation
Copy link
Collaborator

Comments on closed issues and PRs are hard for our team to see. If you need help, please open a new issue that references this one.

@aws aws locked as resolved and limited conversation to collaborators Jul 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
@aws-cdk/aws-apigateway Related to Amazon API Gateway bug This issue is a bug. effort/medium Medium work item – several days of effort p2
Projects
None yet
Development

No branches or pull requests

4 participants