Reputation: 2199
I've got an OLD AWS account that apparently does NOT have a default VPC:
aws ec2 describe-security-groups --group-names webserviced --region us-west-1
A client error (VPCIdNotSpecified) occurred when calling the DescribeSecurityGroups operation: No default VPC for this user
There's no switch on create-vpc...only a boolean (IsDefault) in the output. I'm trying to replicate my infrastructure to the east coast and this is blocking me :( I don't have ANYTHING created on the east-coast (except for a single VPC that apparently isn't set as the default) so I'd at least like to figure out how to do it there so I don't have these issues in the future.
How can I define a default VPC?
P.S. Please don't say that I can't because there's already one defined...unless there's something I'm missing in which case I'd expect a big explanation :)
Upvotes: 3
Views: 1005
Reputation: 101
I have the same problem I deleted the default VPC and everything linked to it while doing some clean up (when I was getting charged for something), Sure enough I ignored the warnings. Upon looking in to the documents it turns out that it is just a pre defined VPC for quick usage u can create one and use it like default VPC by looking at the specs here
https://docs.aws.amazon.com/vpc/latest/userguide/default-vpc-components.html
Upvotes: 0
Reputation: 4582
I can confirm that it's not possible to set a custom VPC to your default VPC. Most use-cases don't require a lot of customization on a VPC since you can map the network in/out of the tunnel.
Upvotes: 2
Reputation: 14533
You cannot mark an existing VPC as a default VPC. You have to contact AWS support to mark your created VPC as the default VPC.
You must provide the following details: your AWS account ID, the region, and the subnet ID. To ensure that your new default subnet behaves as expected, modify the subnet attribute to assign public IP addresses to instances that are launched in that subnet.
Upvotes: 3