Skip to content

Instantly share code, notes, and snippets.

@ben-mcclain
ben-mcclain / tag_snapshots_volumes.py
Last active March 5, 2019 15:00 — forked from brandond/function.py
Python script to auto-tag AWS EBS Snapshots and Volumes using AMI and Instance tags
import copy
import logging
import os
import boto3
logging.basicConfig(level=os.environ.get('LOG_LEVEL', 'INFO'))
ec2 = boto3.client('ec2')
logger = logging.getLogger(__name__)