Skip to content

Commit 57aef72

Browse files
authored
change: use regional endpoint for STS in builds (#245)
1 parent 0405c73 commit 57aef72

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

buildspec-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ phases:
1111
pre_build:
1212
commands:
1313
- start-dockerd
14-
- ACCOUNT=$(aws sts get-caller-identity --query 'Account' --output text)
14+
- ACCOUNT=$(aws --region $AWS_DEFAULT_REGION sts --endpoint-url https://sts.$AWS_DEFAULT_REGION.amazonaws.com get-caller-identity --query 'Account' --output text)
1515

1616
build:
1717
commands:

buildspec.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ phases:
1616
pre_build:
1717
commands:
1818
- start-dockerd
19-
- ACCOUNT=$(aws sts get-caller-identity --query 'Account' --output text)
19+
- ACCOUNT=$(aws --region $AWS_DEFAULT_REGION sts --endpoint-url https://sts.$AWS_DEFAULT_REGION.amazonaws.com get-caller-identity --query 'Account' --output text)
2020
- PREPROD_IMAGE="$ACCOUNT.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$ECR_REPO"
2121
- PR_NUM=$(echo $CODEBUILD_SOURCE_VERSION | grep -o '[0-9]\+')
2222
- echo 'Pull request number:' $PR_NUM '. No value means this build is not from pull request.'

0 commit comments

Comments
 (0)