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

fix: Set API gateway timeout to 30 seconds by default #11453

Merged
merged 1 commit into from Oct 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/plugins/aws/package/compile/events/http-api.js
Expand Up @@ -624,6 +624,7 @@ Object.defineProperties(
IntegrationType: 'AWS_PROXY',
IntegrationUri: resolveTargetConfig(routeTargetData),
PayloadFormatVersion: funcHttpApi.payload || providerHttpApi.payload || '2.0',
TimeoutInMillis: 30000,
};
this.cfTemplate.Resources[
this.provider.naming.getHttpApiIntegrationLogicalId(routeTargetData.functionName)
Expand Down
Expand Up @@ -129,9 +129,9 @@ describe('lib/plugins/aws/package/compile/events/httpApi.test.js', () => {
expect(resource.Properties.RouteKey).to.equal(routeKey);
});

it('should let the default api gateway timeout by not setting the TimeoutInMillis property', () => {
it('should set the default api gateway timeout by setting the TimeoutInMillis property', () => {
const resource = cfResources[naming.getHttpApiIntegrationLogicalId('foo')];
expect(resource.Properties.TimeoutInMillis).to.be.undefined;
expect(resource.Properties.TimeoutInMillis).to.equal(30000);
});

it('should configure lambda permissions', () => {
Expand Down