Updated on 2024-10-14 GMT+08:00

Connecting to an RDS for PostgreSQL Instance

You can connect to an RDS for PostgreSQL instance through a command-line interface (CLI), graphical user interface (GUI), Data Admin Service (DAS), or using Java database connectivity (JDBC).

Table 1 Connection methods

Connection Method

Description

Connecting to an RDS for PostgreSQL Instance Through DAS (Recommended)

DAS enables you to manage databases on a web-based console and provides you with database development, O&M, and intelligent diagnosis to make it easy to use and maintain your databases. The permissions required for connecting to DB instances through DAS are enabled by default.

Connecting to an RDS for PostgreSQL Instance Through the psql CLI Client

In Linux, you need to install a PostgreSQL client on the ECS and connect to the instance through the psql CLI over a private or public network.

  • A private IP address is provided by default.

    When your applications are deployed on an ECS that is in the same region and VPC as the RDS for PostgreSQL instance, you are advised to use a floating IP address to connect to the instance through the ECS.

  • If you cannot access your RDS for PostgreSQL instance through a floating IP address, bind an EIP to the instance and connect to the instance through the EIP.

Connecting to an RDS for PostgreSQL Instance Through the GUI

In Windows, you can use the pgAdmin client to connect to an RDS for PostgreSQL instance.

Connecting to an RDS for PostgreSQL Instance Through JDBC

If you are connecting to an instance through JDBC, the SSL certificate is optional. For security reasons, you are advised to download the SSL certificate to encrypt the connection.