diff --git a/buildspec.yml b/buildspec.yml index 849254ea..ad15d44c 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')"