Creating a connection to a PostgreSQL cluster on AWS

Last modified: March 28, 2025

A PostgreSQL cluster on AWS refers to a group of PostgreSQL database instances that work together to provide high availability, scalability, and fault tolerance. On AWS, you can create and manage a PostgreSQL cluster using Amazon RDS (Relational Database Service) for PostgreSQL or Amazon Aurora with PostgreSQL compatibility.

After a PostgreSQL cluster on AWS is set up, you can use dbForge Studio for PostgreSQL to connect to the cluster and perform any database-related operations.

Prerequisites

Before connecting to a PostgreSQL cluster on AWS, ensure the following:

  • The security group associated with a PostgreSQL cluster allows inbound traffic on port 5432 (default PostgreSQL port) from your IP address.
  • You have the hostname (endpoint) and port for the PostgreSQL cluster. For Amazon RDS, you can find the endpoint in the RDS Console.

Create a database connection to a PostgreSQL cluster on AWS

1. Open the Database Connection Properties dialog by using one of the following ways:

  • On the ribbon, select Database > New Connection.
  • On the Database Explorer toolbar, select New Connection.
  • In Database Explorer, right-click the server connection and select New Connection.

2. On the General tab, specify the connection details:

  • Host: The URL of the PostgreSQL cluster on the Amazon RDS endpoint in the following format:
    <database-instance-name>.<unique-identifier>.<region>.rds.amazonaws.com.
  • Integrated security: The authentication mode that allows you to connect to a database using your Windows user account credentials (the ones you are currently logged in with) to authenticate with the database. So, leave the checkbox cleared to use explicit credentials.
  • Port: The default port number is 5432. You can specify a different port number to connect to the PostgreSQL cluster.
  • User: The name of the user account on the PostgreSQL cluster.
  • Password: The password of the user account on the PostgreSQL cluster.
  • Database: The database name to establish a connection. The database must be selected because every user session must operate within the context of a database.
  • Connection Name: The connection name is automatically derived from the host name and database. You can specify a different connection name.

Database Connection Properties - General

3. Switch to the Security tab and select Use SSL protocol.

Database Connection Properties - Security

Note

Specifying the location of the certificates in the corresponding fields is optional.

4. Optional: To check whether the connection can be established, select Test Connection.

Database Connection Properties - Test Connection

5. Select Connect to create the connection.

The Database Connection Properties dialog is closed, and the connection appears and becomes active in Database Explorer.

Validate the connection to a PostgreSQL cluster on AWS

Verify the connection by executing a SELECT query in dbForge Studio for PostgreSQL.

1. In Database Explorer, right-click the connection and select New SQL to open a new SQL document.

2. In the document that appears, start typing the SELECT query. As you can see, the tool prompts a list of context-based suggestions.

Verify the connection

3. Double-click the required table to insert it in the statement.

4. On the toolbar, select Execute to run the query.

The result would be as follows:

Database Connection Properties - worked example