The hardcoded region here "us-east-1" works well in global regions but not for China regions.
x-pack/metricbeat/module/aws/aws.go
@@ -86,7 +87,9 @@ func NewMetricSet(base mb.BaseMetricSet) (*MetricSet, error) {
}
// Get IAM account name
svcIam := iam.New(awsConfig)
awsConfig.Region = "us-east-1"
Furthermore, I have changed "us-east-1" to "cn-north-1" and re-compiled in both China regions: Beijing and Ningxia, it works well.
So, i would suggest to add a new variable to configure by users.
The hardcoded region here "us-east-1" works well in global regions but not for China regions.
Furthermore, I have changed "us-east-1" to "cn-north-1" and re-compiled in both China regions: Beijing and Ningxia, it works well.
So, i would suggest to add a new variable to configure by users.