Skip to content

Instantly share code, notes, and snippets.

@ktechmidas
Created April 17, 2017 03:28
Show Gist options
  • Save ktechmidas/3118af454ea754482ffdd83090f8e1a8 to your computer and use it in GitHub Desktop.
Save ktechmidas/3118af454ea754482ffdd83090f8e1a8 to your computer and use it in GitHub Desktop.
dev_sda1 = boto.ec2.blockdevicemapping.EBSBlockDeviceType()
dev_sda1.size = 25
bdm = boto.ec2.blockdevicemapping.BlockDeviceMapping()
bdm['/dev/sda1'] = dev_sda1
req = conn.request_spot_instances(price=max_bid,image_id='ami-ea26f684',instance_type=servtype[cnt],key_name=key,availability_zone_group='ap-northeast-2',network_interfaces=interfaces,user_data=ud,block_device_map = [bdm])[0]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment