How Do You Get EC-2 Instances to Get IP Addresses by Default?

Problem scenario
In AWS when you try to create an EC-2 instance, on step #3 to "Configure Instance Details", you are not getting an auto-assigned public IP address. You see this message:

"No default subnet found
Please choose another subnet in your default VPC, or choose another VPC."

What should you do?

Solution
As of November 2020, you cannot create a default subnet with the AWS Management Console (to the best of our knowledge and this posting https://docs.aws.amazon.com/vpc/latest/userguide/default-vpc.html#create-default-subnet that says "Currently, you can create a default subnet using the AWS CLI, an AWS SDK, or the Amazon EC2 API only.").

Procedures
Run a command like this (but change the us-east-2a to the one of your choice):
aws ec2 create-default-subnet --availability-zone us-east-2a

Leave a comment

Your email address will not be published. Required fields are marked *