Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CloudFormation script generates "No subnets found for the default VPC"

I have seem the following error during stack creation in number of AWS provided CloudFormation script. Any idea why its generating VPC error?

Error message:

CREATE_FAILED AWS::EC2::Instance WindowsServer No subnets found for the default VPC 'vpc-aaaaaaa'. Please specify a subnet.

Here is the template: https://s3.amazonaws.com/cloudformation-templates-us-east-1/Windows_Roles_And_Features.template

like image 661
minisch Avatar asked Sep 02 '26 13:09

minisch


1 Answers

I was facing the same problem and the below steps helped me.

  1. Deleted the subnet of the VPC the error was referring to.
  2. Use this command on my shell to create a default subnet:
    aws ec2 create-default-subnet --availability-zone us-east-2a
    

For details please visit this documentation page by Amazon

like image 170
Ali Mohsan Avatar answered Sep 05 '26 06:09

Ali Mohsan



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!