File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -11,8 +11,13 @@ import { getLogger } from '../logger'
11
11
import { ClassToInterfaceType } from '../utilities/tsUtils'
12
12
13
13
export type LambdaClient = ClassToInterfaceType < DefaultLambdaClient >
14
+
14
15
export class DefaultLambdaClient {
15
- public constructor ( public readonly regionCode : string ) { }
16
+ private readonly defaultTimeoutInMs : number
17
+
18
+ public constructor ( public readonly regionCode : string ) {
19
+ this . defaultTimeoutInMs = 5 * 60 * 1000 // 5 minutes (SDK default is 2 minutes)
20
+ }
16
21
17
22
public async deleteFunction ( name : string ) : Promise < void > {
18
23
const sdkClient = await this . createSdkClient ( )
@@ -116,6 +121,10 @@ export class DefaultLambdaClient {
116
121
}
117
122
118
123
private async createSdkClient ( ) : Promise < Lambda > {
119
- return await globals . sdkClientBuilder . createAwsService ( Lambda , undefined , this . regionCode )
124
+ return await globals . sdkClientBuilder . createAwsService (
125
+ Lambda ,
126
+ { httpOptions : { timeout : this . defaultTimeoutInMs } } ,
127
+ this . regionCode
128
+ )
120
129
}
121
130
}
You can’t perform that action at this time.
0 commit comments