Last active
April 8, 2024 22:29
-
-
Save tristanmorgan/a377b692582125b13d66f51eb78be3c4 to your computer and use it in GitHub Desktop.
Generate fake AWS creds for testing using awskeyring and aws(ruby)cli
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
#!/bin/sh | |
TEMP_KEY=$(aws sts generate-fake-key) | |
AWS_ACCESS_KEY_ID=$(jq -r .access_key.access_key_id <<< $TEMP_KEY) | |
echo export AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID | |
echo export AWS_SECRET_ACCESS_KEY=$(jq -r .access_key.secret_access_key <<< $TEMP_KEY) | |
echo export AWS_ACCOUNT_ID=$(awskeyring decode $AWS_ACCESS_KEY_ID) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment