File tree Expand file tree Collapse file tree 3 files changed +9
-0
lines changed
package/compile/events/api-gateway Expand file tree Collapse file tree 3 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -208,6 +208,7 @@ class AwsCompileApigEvents {
208
208
private : { type : 'boolean' } ,
209
209
request : requestSchema ,
210
210
response : responseSchema ,
211
+ timeoutInMillis : { type : 'integer' , minimum : 50 } ,
211
212
} ,
212
213
required : [ 'path' , 'method' ] ,
213
214
additionalProperties : false ,
Original file line number Diff line number Diff line change @@ -51,9 +51,16 @@ const DEFAULT_COMMON_TEMPLATE = `
51
51
module . exports = {
52
52
getMethodIntegration ( http , { lambdaLogicalId, lambdaAliasName } ) {
53
53
const type = http . integration || 'AWS_PROXY' ;
54
+ const globalApiTimeout =
55
+ this . serverless . service &&
56
+ this . serverless . service . provider &&
57
+ this . serverless . service . provider . apiGateway &&
58
+ this . serverless . service . provider . apiGateway . timeoutInMillis ;
59
+
54
60
const integration = {
55
61
IntegrationHttpMethod : 'POST' ,
56
62
Type : type ,
63
+ TimeoutInMillis : http . timeoutInMillis || globalApiTimeout || undefined ,
57
64
} ;
58
65
59
66
// Valid integrations are:
Original file line number Diff line number Diff line change @@ -870,6 +870,7 @@ class AwsProvider {
870
870
} ,
871
871
shouldStartNameWithService : { type : 'boolean' } ,
872
872
stage : { type : 'string' } ,
873
+ timeoutInMillis : { type : 'integer' , minimum : 50 } ,
873
874
usagePlan : {
874
875
anyOf : [
875
876
apiGatewayUsagePlan ,
You can’t perform that action at this time.
0 commit comments