2
votes

I have a very old AWS account, where I used to run old classic ec2 instances in the Virginia region. This means this region does-not have a default vpc.

How can I add this default vpc from the cli or console?
I tried adding a vpc and making it default for the region - but it didn't allow it.

2

2 Answers

0
votes

You can't. Per the docs:

If your account supports EC2-Classic, you cannot use these procedures to create a default VPC in a Region that supports EC2-Classic.

In non-EC2-Classic region, you have the option via the console to create a new default VPC. So you could, for example, create a default VPC in us-east-2 if you have deleted the one that AWS created for you (as far as I can tell, AWS did create default VPCs even in "classic" accounts).

But the bigger question: why do you want a default VPC? The only benefit that it provides you is pre-filling some fields when you manually create resources.

0
votes

To add default VPC, you need: delete or migrate the resources that you have created for use in EC2-Classic and then convert your existing AWS account to VPC-only, after then all regions will have a default VPC.

more details here:

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html#get-default-vpc-region