Created
September 14, 2017 09:08
-
-
Save thinkst/23367c7fa64382fdc41147ba6e544918 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 | |
| usage(){ | |
| echo "./test_aws_creds.sh <access_key_id> <secret_access_key>" | |
| } | |
| export AWS_ACCESS_KEY_ID=$1 | |
| export AWS_SECRET_ACCESS_KEY=$2 | |
| export AWS_DEFAULT_REGION=us-east-2 | |
| echo "Access Key ID: $AWS_ACCESS_KEY_ID" | |
| echo "Secret Access Key: $AWS_SECRET_ACCESS_KEY" | |
| echo "Region: $AWS_DEFAULT_REGION" | |
| resp=$(aws iam create-user --user-name TestMePlease) | |
| if [[ $? != 0 ]];then | |
| echo 'If the token worked, you should receive an alert shortly (0-20 mins)' | |
| else | |
| echo 'Seems the AWS Key allowed you to create an actual user. What?!' | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment