Need help with VPC to access a database

I have a V3 rack running a web application it was made on a new VPC.

Our system has a database that is in a different VPC.

I tried recreating the rack on the same VPC but it failed halfway thru.

Then tried peering i got the application peered but not sure what i need to use instead of the fully Qualified domain name for my connection string now.

Any help would be appreciated very new to networking on the cloud.

Hey @alfredo.e.alvarez

You could go about this either way.

If you’d like to attempt to reinstall the rack into the same VPC please make sure you’re following these steps:
You’ll need to create a new CIDR block in the VPC from the AWS > VPC actions drop down

Then when installing the rack specify the following parameters:

vpc_id=<VPC-ID> - obtain from AWS > VPC
cidr=<CIRD> - the CIDR you created on the VPC
(optional) internet_gateway_id=<Internet-Gateway-ID> - if the VPC has an internet gateway you can include this if not the rack installation process will create one. Location: AWS > VPC > IGW

If you’re still running into errors please paste them and I will take a look.

You can also find the full rack paramteres list here which will have more details on these and other params.

If you’d like to continue with the peering setup that is also a viable solution. It is important to note that your peered VPCs must have different CIDRs to route between them.

After you create the peering connection you will need to configure routing between the two CIDR blocks. This needs to be done separately in both peered VPCs to route data to each other. Location: AWS > VPC > Route Tables

You will need to select the route tables associated with subnets for the RDS instance and rack in both VPCs, then edit the routes to add the CIDR of the peered VPC and route it to the VPC-Peering-Connection

Once this is done on both sides you should have e2e data flow. The only thing you should also consider is if you have any Security Groups or NACL associated to your RDS instance or its EPs that would restrict data from the rack’s VPC.

I hope this helps!