Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

EC2 Instance creation fails due to VPC Issues

So I am following this link: Autoscale based on SQS queue size to create an autoscaling group for my instances. I have read many articles about this problem that I am getting and many people are getting the same problem, but theirs occurs when they try to use "t1.micro". Whereas, I am using "c4.xlarge" instance type and I already have a VPC defined for my Image. Why am I still getting this error:

Launching a new EC2 instance. Status Reason: The specified instance
type can only be used in a VPC. A subnet ID or network interface ID is
required to carry out the request. Launching EC2 instance failed.

Does anybody have a solution for this?

like image 417
Mohammad Sohaib Avatar asked Mar 15 '26 20:03

Mohammad Sohaib


1 Answers

you need to include VPC information in your scripts or init:

http://docs.aws.amazon.com/autoscaling/latest/userguide/asg-in-vpc.html

like image 85
Christian Cerri Avatar answered Mar 18 '26 15:03

Christian Cerri



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!