Before connecting to a DB instance, you must create one first. For details about how to create a DB instance, see Buying an RDS for PostgreSQL Instance. You can connect to an RDS for PostgreSQL instance through a command-line interface (CLI), graphical user interface (GUI), or using Java database connectivity (JDBC).
Connection Method | Description |
|---|---|
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.
| |
In Windows, you can use the pgAdmin client to connect to an RDS for PostgreSQL instance. | |
RDS for PostgreSQL is compatible with the community ecosystem and does not provide driver services. You can select a community driver version as required. 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. |
Table 2 lists how to use a CLI to connect to an RDS for PostgreSQL instance over a private or public network.
Connection Method | IP Address | Security Group Rules | Description |
|---|---|---|---|
Floating IP address |
|
| |
You need to purchase an EIP. | To access a DB instance from resources outside the security group that the DB instance is associated with, you need to configure an inbound rule for the security group. For details, see Configuring Security Group Rules. |
|
Figure 1 Connecting to a DB instance over a private or public network
