From 91d0cb730e9325da1df22db80cdd2f219d7cc42e Mon Sep 17 00:00:00 2001 From: Andrea Spacca Date: Wed, 31 Aug 2022 17:40:07 +0900 Subject: [PATCH 1/2] apply a quick hotfix for having main working properly --- x-pack/libbeat/common/aws/credentials.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/libbeat/common/aws/credentials.go b/x-pack/libbeat/common/aws/credentials.go index 0467c02df2c5..f45989ac9643 100644 --- a/x-pack/libbeat/common/aws/credentials.go +++ b/x-pack/libbeat/common/aws/credentials.go @@ -185,7 +185,7 @@ func EnrichAWSConfigWithEndpoint(endpoint string, serviceName string, regionName beatsConfig.EndpointResolverWithOptions = awssdk.EndpointResolverWithOptionsFunc( func(service, region string, options ...interface{}) (awssdk.Endpoint, error) { - return awssdk.Endpoint{URL: eurl}, nil + return awssdk.Endpoint{URL: eurl, SigningRegion: region}, nil }) } return beatsConfig From 31fe72ea489b3c5b185e7f0127f58294fc8a3a9b Mon Sep 17 00:00:00 2001 From: Andrea Spacca Date: Wed, 31 Aug 2022 18:13:51 +0900 Subject: [PATCH 2/2] fix test --- x-pack/libbeat/common/aws/credentials_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/libbeat/common/aws/credentials_test.go b/x-pack/libbeat/common/aws/credentials_test.go index 2a7d7a31ea02..aa1f757317c9 100644 --- a/x-pack/libbeat/common/aws/credentials_test.go +++ b/x-pack/libbeat/common/aws/credentials_test.go @@ -109,7 +109,7 @@ func TestEnrichAWSConfigWithEndpoint(t *testing.T) { func getEndpointResolverWithOptionsFunc(e string) awssdk.EndpointResolverWithOptionsFunc { return func(service, region string, options ...interface{}) (awssdk.Endpoint, error) { - return awssdk.Endpoint{URL: e}, nil + return awssdk.Endpoint{URL: e, SigningRegion: region}, nil } }