overexchange
overexchange

Reputation: 1

Does --instanceType option decide the EBS volume size mounted to EC2?

In the below command:

aws ec2 run-instances --image-id ${VAR1} --key-name ${VAR2} --security-group-ids ${VAR1} \
  --instance-type t2.micro --subnet ${VAR3} --iam-instance-profile Name=whatever

Volume type can be EBS or EFS or whatever.

Does --instance-type t2.micro decide the volume(type & size) mounted to EC2?

Upvotes: 1

Views: 51

Answers (1)

Mark B
Mark B

Reputation: 200527

Instance type is independent of EBS volume size. Instance type primarily determines the CPU and RAM available to the instance. You would need to specify --block-device-mappings to start an instance with a specific EBS volume size. See this answer for an example.

Upvotes: 2

Related Questions