Skip to content

Commit

Permalink
cleanup: remove aws configure step
Browse files Browse the repository at this point in the history
Creating an AWS profile was a legacy of the initial impl which was based
off of the s3-sync-action which does something similar. If AWS creds
(via access/secret pair or OIDC session token) and region are available
in the environment, then there is no real reason to create a profile to
run commands with, as documented here:

https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html

This is simplified even more now that there is a supported action for
configuring AWS creds before running others.
  • Loading branch information
chetan committed Jun 21, 2022
1 parent 6a51d5b commit c384d5f
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,6 @@ fi

# run

# oif [[ -z "$AWS_SESSION_TOKEN" ]]; then
# # AWS_SESSION_TOKEN will be set when using OIDC creds
# # Create a dedicated profile for this action to avoid
# # conflicts with other actions.
# # https://github.com/jakejarvis/s3-sync-action/issues/1
# _aws_profile="--profile invalidate-cloudfront-action"
# aws configure $_aws_profile <<-EOF > /dev/null 2>&1
# ${AWS_ACCESS_KEY_ID}
# ${AWS_SECRET_ACCESS_KEY}
# ${AWS_REGION}
# text
# EOF
# fi

# Set it here to avoid logging keys/secrets
if [ "$DEBUG" = "1" ]; then
echo "*** Enabling debug output (set -x)"
Expand Down

0 comments on commit c384d5f

Please sign in to comment.