这是我到目前为止使用的命令:
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
答案 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
是要使用的参数。