# to see region and host mapping :# https://github.com/garnaat/missingcloud/blob/master/aws.json#L372development:&default:access_key_id:"":secret_access_key:"":host:""test:<<:*default
instance_id="i-abcd"volume_id=(((ec2.describe_volumes["volumeSet"]||{})["item"]||[]).select{|volume|(volume["attachmentSet"]["item"].select{|ins|ins["instanceId"]==instance_id}.first||{})["instanceId"]==instance_id}.first||{})["volumeId"]result=ec2.create_snapshot(:volume_id=>volume_id,:description=>"foo bar")putsresult["snapshotId"]# 新的 snapshot id