Search code examples
amazon-web-servicesvpnaws-vpc

Can we change Default VPC = No for default VPC in AWS?


I have a complete setup of instances and vpn connection done using default VPC. Due to some reasons, I need to delete default VPC and create new VPC to setup again from scratch.

However I don't want to do that. Can I change flag default VPC to "No" by using any trick? We can't do it directly.


Solution

  • I dont think you can do that. Since Default VPC has some standard component configuration which is configured by aws for you. Because Default VPC has default security group, NACL and Internet gateway configured for your account.

    As per AWS documentation:

    When you create a default VPC, it is created with the standard components of a default VPC, including a default subnet in each Availability Zone. You cannot specify your own components.

    So In your default VPC you might have configured few things which wont be available to your new custom VPC.

    I think that's where Cloudformation template can help you to build stack easily across different environment. If you have created Cloudformation template / terraform, then you can easily migrate to new VPC.

    Note: You can still check with AWS support, if they are ready to do it for you.( may take support charges).