Skip to main content

Connecting to existing RDS instances

In this section, you will be guided through how to establish a connection between an Amazon Elastic Compute Cloud (Amazon EC2) and an existing Amazon RDS Database instance.

The major factor to consider when connecting your relational database service (RDS) to database instance is their existence in the same virtual private cloud (VPC).

Same VPC

If both the RDS and the virtual computing environment exist in the same VPC, the connection can be made simply by providing access to the database via the VPC endpoint and port number. The endpoint enables you to privately connect your VPC to supported AWS services and VPC endpoint services. It is found in the connectivity & security tab of the selected database.

For instructions and more details about connecting specific database engines, check here.

Different VPC

If the RDS and virtual computing environment exist in different VPCs, there are two possible options for connection.

  • Make the database public: It is generally advised not to make RDS instances publicly accessible. More instructions on how to modify your RDS database instance.
  • VPC peering: This is the preferred way to connect two VPCs, and unlike making the database instance public, it is secure. This connection enables full bidirectional connectivity between the VPCs, thereby, making it possible to route traffic between the VPCs using private IP addresses (dns endpoints resolve automatically). Check out this detailed guide on how to work with VPC peering connection.

Coming soon: One click option to setup VPC peering between the Argonaut provisioned environment and any other VPC.