From c40baa1a2320dc7a1a7c5835a1f40a214a4fd104 Mon Sep 17 00:00:00 2001 From: Mitsuhiro Tanda Date: Thu, 25 Oct 2018 13:10:56 +0900 Subject: [PATCH] use default region to call DescribeRegions --- pkg/tsdb/cloudwatch/metric_find_query.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/tsdb/cloudwatch/metric_find_query.go b/pkg/tsdb/cloudwatch/metric_find_query.go index b74af76f09a..e42ba16b443 100644 --- a/pkg/tsdb/cloudwatch/metric_find_query.go +++ b/pkg/tsdb/cloudwatch/metric_find_query.go @@ -239,7 +239,8 @@ func (e *CloudWatchExecutor) handleGetRegions(ctx context.Context, parameters *s "cn-north-1", "cn-northwest-1", "us-gov-east-1", "us-gov-west-1", "us-isob-east-1", "us-iso-east-1", } - err := e.ensureClientSession("us-east-1") + defaultRegion := e.DataSource.JsonData.Get("defaultRegion").MustString() + err := e.ensureClientSession(defaultRegion) if err != nil { return nil, err }