This file contains 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 | |
# Assumption: | |
# 1. Your original AWS Creds should be stored at ~/.aws/credentials | |
# 2. You've corrected ARN for MFA device (search for FIXME) | |
# 3. You've given correct MFA Code as cli argument | |
# 4. You have jq installed. Ref: https://stedolan.github.io/jq/ | |
if [ "$1" == "" ]; then | |
echo "Usage: `basename "$0"` <MFA-TOKEN>" | |
exit |