Created
May 10, 2019 18:33
-
-
Save xbalaji/cac26bab23660a8c3f1f65561957586b to your computer and use it in GitHub Desktop.
AWS CLI environment setup
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/bash | |
# To encrypt | |
# 1. save the unencrypted data in file called clear.txt | |
# 2. execute | |
# gpg -o ./pass.gpg -c ./clear.txt 2>/dev/null | |
# 3. remove clear.txt | |
# To decrypt | |
# 1. gpg -o clear2.txt -d ./pass.gpg 2>/dev/null | |
# 2. cat clear2.txt | |
# | |
# typically invoked ./aws_cli_env --profile <profile_name> | |
export AWS_CLI_USER=$(gpg -o - ~/.gnupg/set_aws_user.gpg 2>/dev/null) | |
export AWS_CLI_PASS=$(gpg -o - ~/.gnupg/set_aws_pass.gpg 2>/dev/null) | |
~/bin/samlapi.py -u ${AWS_CLI_USER} -p ${AWS_CLI_PASS} $* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment