From d3f1be0b2794eda5ecc6862390e25250f90c7fa2 Mon Sep 17 00:00:00 2001 From: Trent Mick Date: Thu, 1 Aug 2024 08:37:00 -0700 Subject: [PATCH] fix(release): ensure we publish Lambda Layers to the intended AWS region (#4172) Before this change an errant AWS_REGION envvar would override the AWS_DEFAULT_REGION envvar. Explcitly using --region=... will win. Fixes: #4171 Refs: #4109 --- .ci/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.ci/Makefile b/.ci/Makefile index 9e460a5164..c15c462433 100644 --- a/.ci/Makefile +++ b/.ci/Makefile @@ -57,6 +57,7 @@ publish: validate-layer-name validate-aws-default-region @aws lambda \ --output json \ publish-layer-version \ + --region="$(AWS_DEFAULT_REGION)" \ --layer-name "$(ELASTIC_LAYER_NAME)" \ --description "AWS Lambda Extension Layer for the Elastic APM Node.js Agent" \ --license "Apache-2.0" \ @@ -69,6 +70,7 @@ grant-public-layer-access: validate-layer-name validate-aws-default-region @aws lambda \ --output json \ add-layer-version-permission \ + --region="$(AWS_DEFAULT_REGION)" \ --layer-name "$(ELASTIC_LAYER_NAME)" \ --action lambda:GetLayerVersion \ --principal '*' \