I use the Ruby AWS-SDK to create EC2 instances like this :
instance = ec2.instances.create({
:image_id => WORKER_AMI,
:instance_type => instance_type,
:key_name => 'cloud',
:security_groups => 'worker',
:user_data => user_data_script,
:count => 1,
:block_device_mappings => [
{
:device_name => "/dev/sda1",
:ebs => { :volume_size => 50, :delete_on_termination => true }
}
]
})
When doing that, I get a 50 Gb root volume. But I also get a 360G ephemeral disk I don't need. In the AWS console, you can remove it in the wizard when you launch an instance. But how to do it via the SDK ?