Skip to content

[Metricbeat] Unable to get account id in China regions #18850

@henrysher

Description

@henrysher

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions