4 thoughts on “AWS: Create EC2 Snapshot based on metadata tag value

  1. Hi Dean,

    Thank you for this script.
    I have some questions that I’m guessing you can answer:

    I created a tag for my snapshots which I called “Name” where I specify the instance which the volume is attached to.
    Is it possible to modify this script so it puts the Instance-tag “Name” in the Snapshot-tag called “Name”?


  2. It is not possible using the above as the collection is built from querying all volumes and their is no relationship between the volume and the instance.

    You would need to build a collection based on your EC2 instance then loop through each one to return the volumes to invoke the New-EC2Snapshot cmdlet, where you pass the name tag of the instance instead of the description in my example.


Leave a Reply

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

WordPress.com Logo

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

Facebook photo

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

Connecting to %s