Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
"""
A quick script to get temporary aws access keys.
expects AWS_MFA_ARN to exist in the aws default credential
export AWS_MFA_ARN="arn:aws:iam::123456789:mfa/me"
"""
#!/usr/bin/env python
# a quick script to export all instances from all regions to csv
import os
import boto3
from botocore.exceptions import ClientError
from datetime import datetime, timedelta
import logging
import sys
import csv