File tree 2 files changed +8
-3
lines changed
2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ Resources:
50
50
Role : !GetAtt FunctionRole.Arn
51
51
Runtime : nodejs8.10
52
52
MemorySize : 256
53
- Timeout : 10
53
+ Timeout : 15 # Cross-region metrics lookup requires at least 10s
54
54
Code :
55
55
S3Bucket : !Sub 'aws-to-slack-${AWS::Region}'
56
56
S3Key : release.zip
Original file line number Diff line number Diff line change @@ -149,7 +149,10 @@ class AwsCloudWatchChart {
149
149
this . height = _ . get ( config , "height" , 250 ) ;
150
150
this . metrics = [ ] ;
151
151
152
- const clientOpt = { } ;
152
+ const clientOpt = {
153
+ // Cross-region lookups requires at least 10s
154
+ httpOptions : { timeout : 10000 } ,
155
+ } ;
153
156
if ( this . region ) {
154
157
clientOpt . region = this . region ;
155
158
}
@@ -225,7 +228,9 @@ class AwsCloudWatchChart {
225
228
metricNamespace : query . Namespace ,
226
229
limit : 1 ,
227
230
} ;
228
- const clientOpt = { } ;
231
+ const clientOpt = {
232
+ httpOptions : { timeout : 10000 } ,
233
+ } ;
229
234
if ( this . region ) {
230
235
clientOpt . region = this . region ;
231
236
}
You can’t perform that action at this time.
0 commit comments