到目前为止,这是我一直在使用的命令:
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
From the 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 ...
It appears that VolumeSize
is the parameter to use.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.