t2 instances only work with a VPC (as documented here: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/t2-instances.html#t2-instances-vpc-support). So when running via AWS CLI, how do I specify a VPC on the command line? I've followed the document here (http://docs.aws.amazon.com/codedeploy/latest/userguide/how-to-set-up-new-instance.html) and have the command line setup as outlined:
aws ec2 run-instances \
--image-id amiID \
--key-name keyName \
--user-data file://instance-setup.sh \
--count 1 \
--instance-type instanceType \
--iam-instance-profile Name=CodeDeployDemo-EC2-Instance-Profile
I realize using an m3 instance works as expected, but I'd like a t2.micro since this instance will only be used for deployment.
--subnet-idof the command. Full docs: docs.aws.amazon.com/cli/latest/reference/ec2/run-instances.html - datasage