Last active
April 28, 2021 20:14
-
-
Save jrolfs/5dfb40c7eba8fd367cebddee8e08706e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
echo -e "Checking → key: ${1} / secret: ${2}\r" | |
command="docker run -e AWS_ACCESS_KEY_ID=$1 -e AWS_SECRET_ACCESS_KEY=$2 mikesir87/aws-cli bash -c \"env && echo -e '\n' && aws sts get-caller-identity\"" | |
echo -e "Running:\n\n $command \n" | |
eval $command | |
echo -e "\nTimestamp: $(date -u +"%Y-%m-%dT%H:%M:%SZ")" |
Pipe output to clipboard: ./aws-key.sh [KEY] [SECRET] |& pbcopy
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Usage:
./aws-key.sh [KEY] [SECRET]