wiki:aws_cli_2fa
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
wiki:aws_cli_2fa [2024/10/24 10:57] – [AWS CLI with 2FA] update bash script antisa | wiki:aws_cli_2fa [2024/10/29 13:58] (current) – [See also] add aws cli commands antisa | ||
---|---|---|---|
Line 60: | Line 60: | ||
# . ~/ | # . ~/ | ||
- | #set -x | + | # debug |
+ | # set -x | ||
+ | |||
+ | if [ " | ||
+ | then | ||
+ | echo "Hey, you should source this script, not execute it!" | ||
+ | echo "e.g. '. aws_get_session.sh 1234'" | ||
+ | exit 1 | ||
+ | fi | ||
+ | |||
+ | if [ -z $1 ];then | ||
+ | echo "You must provide 2FA token!" | ||
+ | return 1 | ||
+ | fi | ||
# colors | # colors | ||
On_Yellow=' | On_Yellow=' | ||
Line 77: | Line 91: | ||
aws_secret_access_key = $(echo " | aws_secret_access_key = $(echo " | ||
aws_session_token = $(echo " | aws_session_token = $(echo " | ||
+ | |||
EOF | EOF | ||
Line 88: | Line 103: | ||
====== See also ====== | ====== See also ====== | ||
+ | * [[wiki: | ||
====== References ====== | ====== References ====== | ||
* https:// | * https:// | ||
* https:// | * https:// | ||
wiki/aws_cli_2fa.1729760250.txt.gz · Last modified: 2024/10/24 10:57 by antisa