Web Server Connection to RDS

0

I have two cloud accounts in AWS. One cloud account has an application/web server in VPC1 and a transient gateway. Second cloud account has an RDS Oracle server in VPC2.

I need to have web server connect to RDS oracle server in account 2 using the transient gateway?

How do you configure this connection?

2 Answers
0
Accepted Answer

Short answer: This works as you would expect.

Consider Transit Gateway to be a cloud-scale router. Under the hood it's much more than that but for your purposes you can use it to connect the two VPCs together. The documentation has a lot of detail about how to do this. Once done, your web server (in one VPC) can communicate with the RDS instance (in another VPC). They can also be in different accounts.

Note that if you only have two VPCs that VPC peering is an alternative which is lower cost. With many VPCs, Transit Gateway is usually a better answer though.

profile pictureAWS
EXPERT
answered a year ago
profile pictureAWS
EXPERT
reviewed a year ago
  • Great Answer! I think this might be already in place. How do you normally test the connection from one server (LINUX/WINDOWS) in in one account to another server in another account (i.e ping, telnet, powershell)?

  • Great Answer! I think this might be already in place. How do you normally test the connection from one server (LINUX/WINDOWS) in in one account to another server in another account (i.e ping, telnet, powershell)?

  • Any of those are valid ways to test the connection. You might also use VPC Reachability Analyzer but for a quick test those other tools are ideal.

  • I remembered I cant use these tools since machine is not EC2. RDS machine will not allow operating system access (only SQL). Is there a way to test using SQL Developer command instead?

  • You can try to connect to the database port using tools like telnet - that will still work. e.g. telnet <RDS IP address> <RDS port>

0

Account A has the web server and the transit gateway. Account B has the RDS server.

First thing you would need to do is to share the transit gateway with Account B. Follow this article to do so https://repost.aws/knowledge-center/transit-gateway-sharing

The article would guide you through the steps on how to create an attachment for VPC2, once this is done then you would have to setup the VPC route table to forward traffic to the transit gateway, and then configure the transit gateway route table for VPC1 and VPC2.

profile pictureAWS
Matt_E
answered a year ago
profile pictureAWS
EXPERT
reviewed a year ago
  • I think this might be already setup. Is there a way to test the TCP connection from first RDS to the second RDS?

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