Skip to content

Instantly share code, notes, and snippets.

@asvignesh
asvignesh / delete_Snapshots.py
Created January 28, 2018 11:22
Delete old EBS snapshots using Boto3 AWS Lambda Python
from datetime import datetime, timedelta, timezone
import boto3
class Ec2Instances(object):
def __init__(self, region):
print("region "+ region)
self.ec2 = boto3.client('ec2', region_name=region)