From e404935d31b42571c74ae1f780cf64251545ffd6 Mon Sep 17 00:00:00 2001 From: Lauren Yu <6631887+laurenyu@users.noreply.github.com> Date: Wed, 23 Oct 2019 17:28:53 -0700 Subject: [PATCH] change: use regional endpoint for STS in builds --- buildspec.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildspec.yml b/buildspec.yml index d2ccf72d..42fc6f99 100644 --- a/buildspec.yml +++ b/buildspec.yml @@ -20,7 +20,7 @@ phases: pre_build: commands: - start-dockerd - - ACCOUNT=$(aws sts get-caller-identity --query 'Account' --output text) + - ACCOUNT=$(aws --region $AWS_DEFAULT_REGION sts --endpoint-url https://sts.$AWS_DEFAULT_REGION.amazonaws.com get-caller-identity --query 'Account' --output text) - PREPROD_IMAGE="$ACCOUNT.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$ECR_REPO" - PR_NUM=$(echo $CODEBUILD_SOURCE_VERSION | grep -o '[0-9]\+') - BUILD_ID="$(echo $CODEBUILD_BUILD_ID | sed -e 's/:/-/g')"