You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# get the current mappingmapping=ec2,get_instance_attribute('i-xxxxxxxx', 'BlockDeviceMapping')
# remove the current valuenew_mapping=set(mapping) -set('/dev/sda=false', '/dev/sda=true')
# add the new valuenew_mapping=list(new_mapping) + ['/dev/sda=true']
# write the new mappingec2.modify_instance_attribute('i-xxxxxxxx', 'BlockDeviceMapping', ['/dev/sda=false', '/dev/sdb=true']
Not sure though, doesn't seem very forward compatible.
http://boto.cloudhackers.com/en/latest/ref/ec2.html#boto.ec2.connection.EC2Connection.modify_instance_attribute
Should be an optional setting in the volumes dict, delete_on_termination, True by default.
The text was updated successfully, but these errors were encountered: