如何将首选硬盘大小传递给“aws ec2 run-instances”命令?

时间:2017-03-12 16:29:13

标签: amazon-web-services amazon-ec2 cloud

这是我到目前为止使用的命令:

aws ec2 run-instances --user-data file://user-data.sh --region us-east-1 --image-id ami-e13739f6 --key-name redacted1 --instance-type t2.small --query 'Instances[].InstanceId' --output text

1 个答案:

答案 0 :(得分:0)

来自run-instances documentation

  

--block-device-mappings (list)

     

VirtualName = string,DeviceName = string,Ebs = {SnapshotId = string,VolumeSize = integer,DeleteOnTermination = boolean,VolumeType = string,Iops = integer,Encrypted = boolean},NoDevice = string ...

似乎VolumeSize是要使用的参数。