Skip to content

Instantly share code, notes, and snippets.

@tristanmorgan
Last active April 8, 2024 22:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tristanmorgan/a377b692582125b13d66f51eb78be3c4 to your computer and use it in GitHub Desktop.
Save tristanmorgan/a377b692582125b13d66f51eb78be3c4 to your computer and use it in GitHub Desktop.
Generate fake AWS creds for testing using awskeyring and aws(ruby)cli
#!/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