简体   繁体   English

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

[英]How to pass the preferred hard disk size to “aws ec2 run-instances” command?

到目前为止,这是我一直在使用的命令:

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 : run-instances文档中

--block-device-mappings (list)

VirtualName=string,DeviceName=string,Ebs={SnapshotId=string,VolumeSize=integer,DeleteOnTermination=boolean,VolumeType=string,Iops=integer,Encrypted=boolean},NoDevice=string ... 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. 似乎VolumeSize是要使用的参数。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM