Skip to content

Commit

Permalink
Disable metadata for AWS cli v2 in container entrypoint
Browse files Browse the repository at this point in the history
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
  • Loading branch information
pst committed Apr 17, 2021
1 parent c8b5f65 commit 5478192
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion oci/entrypoint_user
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if [ -x "$(command -v aws)" ]; then
# handle base64 encoded AWS crendentials
if [ ! -z "$KBST_AUTH_AWS" ]; then
echo "$KBST_AUTH_AWS" | base64 --decode > $AWS_CONFIG_PATH/credentials
aws sts get-caller-identity
AWS_EC2_METADATA_DISABLED=true aws sts get-caller-identity
fi
fi

Expand Down

0 comments on commit 5478192

Please sign in to comment.