Any ideas on how to easily copy a snapshot to another region with boto?
You can easily do it through the management console - right clicking the snapshot, then "copy", then choosing your preferable region.
I hoped to have something similar with boto but couldn't find any.
Thanks
You can use the copy_snapshot()
method in the EC2 module to copy snapshots within a region or between regions. For example, if you had an existing snapshot in us-east-1
and you wanted to copy it to us-west-2
you could do this:
import boto.ec2
conn = boto.ec2.connect_to_region('us-west-2')
conn.copy_snapshot(source_region='us-east-1', source_snap_id='snap-12345678',
description='My new copy')
see: boto.ec2.connection.EC2Connection.copy_snapshot
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With