Skip to content

Instantly share code, notes, and snippets.

View jvacek's full-sized avatar

Jonas Vacek jvacek

View GitHub Profile
@jvacek
jvacek / aws-mfa.sh
Last active September 7, 2021 14:16 — forked from mankins/aws-mfa.sh
aws mfa cli tool
#!/bin/bash
# From a user's MFA code, generate accesskey, secret, session token
#
# ENV inputs:
# AWS_CLI_INPUT = /path/to/token/config.json
# AWS_PROFILE = The Aws profile to use for aws commands
MFA_CODE=$1
if [ -z $MFA_CODE ]; then