Skip to content

Commit 5478192

Browse files
committed
Disable metadata for AWS cli v2 in container entrypoint
The v2 AWS cli throws an exception if run on Azure, e.g. via Github Actions due to presumeabley due to the metadata service using the same IP address. Apparently handling exceptions is too difficult for AWS. aws/aws-cli#5262 aws/aws-cli#5623
1 parent c8b5f65 commit 5478192

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

oci/entrypoint_user

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ if [ -x "$(command -v aws)" ]; then
1212
# handle base64 encoded AWS crendentials
1313
if [ ! -z "$KBST_AUTH_AWS" ]; then
1414
echo "$KBST_AUTH_AWS" | base64 --decode > $AWS_CONFIG_PATH/credentials
15-
aws sts get-caller-identity
15+
AWS_EC2_METADATA_DISABLED=true aws sts get-caller-identity
1616
fi
1717
fi
1818

0 commit comments

Comments
 (0)