How to launch a new EC2 instance with the New-EC2Instance but with increased volume size (greater than the 8GB standard). I tried it with:
...
$blockDeviceMapping = New-Object -TypeName Amazon.EC2.Model.BlockDeviceMapping
$ebsBlockDevice = New-Object -TypeName Amazon.EC2.Model.EbsBlockDevice
$blockDeviceMapping.DeviceName = '/dev/sda1'
$ebsBlockDevice.VolumeSize = '50'
$ebsBlockDevice.VolumeType = 'standard'
$blockDeviceMapping.Ebs = $ebsBlockDevice
...
$NewInstanceResponse = New-EC2Instance <...> -BlockDeviceMapping $blockDeviceMapping
But it creates an instance with an unmounted volume. I am trying to create an instance with 1 storage volume with the size of 50GB.