Connect to an instance

Last Updated: Dec 12, 2017

You can connect to an RDS instance through a PostgreSQL client. This article introduces the connection procedure by taking the pgAdmin 4 client as an example.

Background information

This article takes the pgAdmin 4 client as an example to connect to an RDS instance. You can see this method when using other clients. When you connect to an RDS instance through clients, pay attention to the following information on the selection of the connection address.

  • Use the intranet address when your client is installed on the ECS that is located in the same region and the same network type with those of the RDS instance to be connected.

  • Use the Internet address for the other situations.

Procedure

  1. Add the IP address accessing the RDS instance to RDS whitelist. For more information on how to set whitelist, see Set the whitelist.

  2. Start the pgAdmin 4 client.

  3. Right click Servers, and then select Create > Server, as shown in the following figure.

    Create server

  4. On the General tab of Create - Server window, enter server name, as shown in the following figure.

  5. Select the Connection tab, and enter the information of the instance to be connected, as shown in the following figure.

    Parameters description:

    • Host name/address: refers to the connection address of the RDS instance. If your application accesses the RDS instance by using the intranet, enter the intranet address of the RDS instance. If your application accesses the RDS instance by using the Internet, enter the Internet address of the RDS instance. The following procedure shows how to find the connection address and port number of the RDS instance.

      1. Log on to the RDS console.

      2. Select the region where the target instance is located.

      3. Click the ID of the instance to visit the Basic Information page.

      4. In the Basic Information area, you can find the Internet/intranet address and Internet/intranet port number of the instance, as shown in the following figure.

        View the basic information of the instance

    • Port: refers to the port number of the RDS instance. If your application accesses the RDS instance by using the intranet, enter the intranet port number of the RDS instance. If your application accesses the RDS instance by using the Internet, enter the Internet port number of the RDS instance.

    • Username: refers to the initial account name of the RDS instance.

    • Password: refers to the password corresponding to the initial account of the RDS instance.

  6. Click Save.

  7. If the connection information is correct, select Servers > server name > Databases > edb or postgres, and the following interface appears, which indicates that the connection to RDS instance is successful.

    Note: edb and postgres are the default system databases of the RDS instance. Do not do any operation in these two databases.

    Connect to RDS instance successfully

Thank you! We've received your feedback.