How to create EC-2 snapshots with name tags and remove old snapshots

Say you use AWS and you have some instances you need to backup regularly.  To backup an instance of EC2, you need:

  1. Find out the volume id used by your EC2 instance
  2. create a snapshot based on that volume id, with a description
  3. associate tags (such as name) to the snapshot for easy reading/sorting
  4. delete old snapshots in order to keep the number of snapshots manageable.

I build my custom scripts based on the blog below:


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s