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.
Pinging @elastic/integrations-platforms (Team:Platforms)
Is there any progress on this issue ?
A config param aws_partition could indicate the aws account type.
https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
The following are the supported partitions:
aws - AWS Regions
aws-cn - AWS China Regions
aws-us-gov - AWS GovCloud (US) Regions
Most helpful comment
Is there any progress on this issue ?
A config param
aws_partitioncould indicate the aws account type.https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html