No Default VPC in my Account

0

I'm trying to create a Peering VPC from Lightsail to a VPC in my account to connect to Elasticache. I've read that this will only work with a "Default VPC".

My issue is that my account has no Default VPC, and I'm unsure how to convert the VPC I want to use to a "Default VPC".

Is there any way to do this?

Thank you.

  • Please tag the answer as accepted answer if it has provided the response to your query. Thanks a lot !

AL
asked 10 months ago458 views
3 Answers
3

If for some reason you don’t have the default vpc anymore, follow this to get it back: https://repost.aws/knowledge-center/deleted-default-vpc

profile picture
EXPERT
answered 10 months ago
2
Accepted Answer

You cannot convert your PC to a default VPC but you can create a new one. In the VPC console (Your VPCs) where you have the list of VPCs, click on Actions->Create Default VPC.

Default VPCs have a specific IP address range and setting that you can see here.

AWS
answered 10 months ago
profile picture
EXPERT
reviewed 10 months ago
  • So does this mean that I would have to move all my resources into the new VPC and redo all of my security groups and everything?

  • yes, LightSail makes the peering automatically only to your Default VPC in that region and you need to move the resources used by LightSail to that Default VPC. One important point is that you can Peer the Default VPC as well with other VPCs to achieve this scenario : LightSail<->DefaultVPC<->AnotherVPC but as the Peering is not transitive , you cannot use this setup to reach from LightSail to AnotherVPC but this will allow you to move only those resources required to DefaultVPC (e.g. you caching) and you can leave other resources not used by LightSail but used by your caching where they are as they will be able to talk to your caching through DefaultVPC<->AnotherVPC peering.

  • This is what I wound up doing. Thank you.

-1

When it comes to peering a Lightsail VPC to a VPC in your account, you don't necessarily need a Default VPC. You can establish a VPC peering connection between your Lightsail VPC and your custom VPC.

To create a VPC peering connection between your Lightsail VPC and your custom VPC, follow these steps:

  1. Go to the Amazon VPC console: https://console.aws.amazon.com/vpc/
  2. In the navigation pane, select "Peering Connections" under the "Virtual Private Cloud" section.
  3. Click on the "Create Peering Connection" button.
  4. Specify a name for the peering connection and select your Lightsail VPC as the requester VPC.
  5. Select your custom VPC as the accepter VPC.
  6. Click on "Create Peering Connection".

Once the peering connection is created, you'll need to modify the route tables of the respective VPCs to allow traffic to flow between them.

  1. In the Amazon VPC console, go to "Route Tables" under the "Virtual Private Cloud" section.
  2. Select the route table associated with your Lightsail VPC.
  3. Edit the route table and add a route that points to the CIDR block of your custom VPC and uses the peering connection as the target.
  4. Repeat the same steps for the route table associated with your custom VPC, adding a route for the CIDR block of your Lightsail VPC with the peering connection as the target.

After configuring the route tables, the VPCs will be able to communicate with each other through the peering connection.

Remember to ensure that your Lightsail VPC and your custom VPC have non-overlapping CIDR blocks and that the necessary security groups and network ACLs are properly configured to allow the desired traffic.

By establishing a VPC peering connection, you can connect your Lightsail VPC to your custom VPC and access Elasticache or any other resources within your custom VPC.

Let me know if it changes. Thnks!

profile picture
answered 10 months ago
profile picture
EXPERT
reviewed a month ago
  • There doesn't appear to be a way to select a Lightsail VPC as the Requester. My only options are two VPCs that I made.

  • This response is not correct, as per the documentation for LightSail peering is only available with the Default VPC in the same account and region.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions