Skip to content

Instantly share code, notes, and snippets.

Avatar

Brian Rogers brianrogers

View GitHub Profile
@brianrogers
brianrogers / old-rds-snapshots-to-csv.py
Created May 11, 2022
pull old RDS snapshot info and create csv files per region
View old-rds-snapshots-to-csv.py
from asyncore import write
import boto3
import datetime
import pytz
import csv
regions = ['us-east-1','eu-central-1','eu-west-1','ca-central-1','us-east-2','eu-west-2','us-west-1','ap-southeast-2','ap-southeast-1','us-west-2']
headers = ['DBSnapshotIdentifier', 'DBInstanceIdentifier', 'SnapshotCreateTime', 'AllocatedStorage', 'DBSnapshotArn']
now = pytz.utc.localize(datetime.datetime.now())