From b49f904ec42d6e1c7931a8bd1d0df48bf72f0420 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9mi=20V=C3=A1nyi?= Date: Mon, 7 Feb 2022 16:16:14 +0100 Subject: [PATCH] Do not pass empty region configuration when deploying Lambdas using Functionbeat manager (#30238) --- CHANGELOG.next.asciidoc | 2 ++ x-pack/functionbeat/manager/aws/cli_manager.go | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index 038235b4b262..dc7ecba6e7b2 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -123,6 +123,8 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...main[Check the HEAD dif *Functionbeat* +- Pass AWS region configuration correctly. {issue}28520[28520] {pull}30238[30238] + *Elastic Logging Plugin* diff --git a/x-pack/functionbeat/manager/aws/cli_manager.go b/x-pack/functionbeat/manager/aws/cli_manager.go index a4b4b7dbf3de..408e13754a1e 100644 --- a/x-pack/functionbeat/manager/aws/cli_manager.go +++ b/x-pack/functionbeat/manager/aws/cli_manager.go @@ -219,7 +219,9 @@ func NewCLI( if err != nil { return nil, fmt.Errorf("failed to get aws credentials, please check AWS credential in config: %+v", err) } - awsCfg.Region = config.Region + if config.Region != "" { + awsCfg.Region = config.Region + } builder, err := provider.TemplateBuilder() if err != nil {