Skip to content

Instantly share code, notes, and snippets.

@DaytonG
DaytonG / awsmfa.py
Last active November 28, 2020 18:49
Create a new token auth AWS session using an MFA device
#!/bin/env python3
"""
Create a new token auth AWS session using an MFA device.
Usage:
$(python3 awsmfa.py 123456)
You can also install this into your shell profile, like ~/.bashrc
```
setawsmfa() {