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 #14123

Closed
Samrose-Ahmed opened this issue Apr 12, 2021 · 2 comments · Fixed by #14154
Closed

(apigateway): support integration timeout #14123

Samrose-Ahmed opened this issue Apr 12, 2021 · 2 comments · Fixed by #14154
Assignees
Labels
@aws-cdk/aws-apigateway Related to Amazon API Gateway effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. good first issue Related to contributions. See CONTRIBUTING.md p2

Comments

@Samrose-Ahmed
Copy link
Contributor

API gateway lets you specify a timeout for integrations. This is available in CloudFormation (see here). However, this isn't available when using RestApi construct.

Reproduction Steps

Create any RestApi with an integration, can't specify the timeout directly.

What did you expect to happen?

To be able to specify a custom timeout.

What actually happened?

Default timeout used.

Can use overrides to achieve (see here), but should be directly available:

const api = new apig.RestApi(this, "MyRestApi");
const httpIntegration = new apig.HttpIntegration("https://example.com");
const proxy = api.root.addProxy({
   defaultIntegration: httpIntegration,
   anyMethod: true,
});
// Override the timeout on integration since CDK doesn't expose property.
const anyMethod = proxy!.anyMethod;
const cfnAnyMethod = (anyMethod!.node!.defaultChild as apig.CfnMethod);
cfnAnyMethod.addPropertyOverride("Integration.TimeoutInMillis", cdk.Duration.seconds(10).toMilliseconds())

Environment

  • CDK CLI Version :
  • Framework Version:
  • Node.js Version:
  • OS :
  • Language (Version):

Other


This is 🐛 Bug Report

@Samrose-Ahmed Samrose-Ahmed added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Apr 12, 2021
@github-actions github-actions bot added the @aws-cdk/aws-apigateway Related to Amazon API Gateway label Apr 12, 2021
@nija-at nija-at added effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. good first issue Related to contributions. See CONTRIBUTING.md and removed bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Apr 13, 2021
@nija-at nija-at changed the title (aws-apigateway): Integration missing timeout option (apigateway): support integration timeout Apr 13, 2021
@nija-at nija-at added the p2 label Apr 13, 2021
@nija-at
Copy link
Contributor

nija-at commented Apr 13, 2021

Hi @Samrose-Ahmed -

I've reclassified this issue as a feature request.

I am also marking this issue as p2, which means that we are unable to work on this immediately. We use +1s to help prioritize our work, and are happy to revaluate this issue based on community feedback.

We are also happy to accept pull requests.

Samrose-Ahmed added a commit to Samrose-Ahmed/aws-cdk that referenced this issue Apr 13, 2021
Add an option to set a custom timeout when adding a RestApi integration.

fixes aws#14123
@mergify mergify bot closed this as completed in #14154 Apr 16, 2021
mergify bot pushed a commit that referenced this issue Apr 16, 2021
Add an option to set a custom timeout when adding a RestApi integration.

fixes #14123


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions
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.

hollanddd pushed a commit to hollanddd/aws-cdk that referenced this issue Aug 26, 2021
Add an option to set a custom timeout when adding a RestApi integration.

fixes aws#14123


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-apigateway Related to Amazon API Gateway effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. good first issue Related to contributions. See CONTRIBUTING.md p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants