File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ Resources:
5050 Role : !GetAtt FunctionRole.Arn
5151 Runtime : nodejs8.10
5252 MemorySize : 256
53- Timeout : 10
53+ Timeout : 15 # Cross-region metrics lookup requires at least 10s
5454 Code :
5555 S3Bucket : !Sub 'aws-to-slack-${AWS::Region}'
5656 S3Key : release.zip
Original file line number Diff line number Diff line change @@ -149,7 +149,10 @@ class AwsCloudWatchChart {
149149 this . height = _ . get ( config , "height" , 250 ) ;
150150 this . metrics = [ ] ;
151151
152- const clientOpt = { } ;
152+ const clientOpt = {
153+ // Cross-region lookups requires at least 10s
154+ httpOptions : { timeout : 10000 } ,
155+ } ;
153156 if ( this . region ) {
154157 clientOpt . region = this . region ;
155158 }
@@ -225,7 +228,9 @@ class AwsCloudWatchChart {
225228 metricNamespace : query . Namespace ,
226229 limit : 1 ,
227230 } ;
228- const clientOpt = { } ;
231+ const clientOpt = {
232+ httpOptions : { timeout : 10000 } ,
233+ } ;
229234 if ( this . region ) {
230235 clientOpt . region = this . region ;
231236 }
You can’t perform that action at this time.
0 commit comments