Automate Your AWS Infrastructure with Boto 3 — AWS Snapshots

Part 3 — How to write a Python script to automate creation of AWS snapshots

Madison Schott
Capital One Tech
Published in
3 min readSep 16, 2020

--

orange, blue, pink, green, and brown gears on a black background

When I first joined a DevOps/SRE team, I realized there were a lot of simple AWS infrastructure changes that took up a large chunk of our engineering team’s time. I didn’t want to spend my valuable coding time on these manual, yet essential, tasks so I set out on a mission to automate them. Since I had wanted to build my Python scripting skills anyway, I discovered a way to solve two problems at once — using the software development kit Boto 3 to automate my simple, manual AWS tasks using Python.

For the third installment in this series I wanted to teach you how to write a Python script that can be used to automate the creation of snapshots in the AWS environment. If you came from Part 1 or Part 2 then you already know how to automate instance tags and health checks.

First, let’s go over why you may want to automate creating snapshots. Snapshots are important for data backup and creating new EBS volumes. You may want to automate this to ensure your data is always available in case you need it. Let’s say you have an entire environment worth of EBS volumes that have not been backed up. This would be a great time to run a script that automatically creates snapshots of…

--

--

Capital One Tech
Capital One Tech

Published in Capital One Tech

The low down on our high tech from the engineering experts at Capital One. Learn about the solutions, ideas and stories driving our tech transformation.

Madison Schott
Madison Schott

Written by Madison Schott

Analytics Engineer @ ConvertKit, author of the Learn Analytics Engineering newsletter and The ABCS of Analytics Engineering ebook, health & wellness enthusiast