This topic describes how to apply for a public endpoint for an RDS for PostgreSQL instance. Apsara for RDS supports two types of endpoints: internal endpoints and public endpoints. By default, the system provides you with an internal endpoint for connecting to your RDS instance. If you want to connect to your RDS instance through the Internet, you must apply for a public endpoint.

Internal and public endpoints

Endpoint type Description
Internal endpoint
  • An internal endpoint is generated by default.
  • If your application is deployed on an ECS instance that is located in the same region as your RDS instance and, at the same time, the ECS instance has the same network type as your RDS instance, your RDS instance can communicate with the ECS instance through a private network. In such case, you do not need to apply for a public endpoint.
  • Accessing your RDS instance through a private network is more secure and helps to maximize RDS performance.
Public endpoint
  • You must manually apply for a public endpoint, which can be released at anytime.
  • If you cannot access your RDS instance through a private network in one of the following scenarios, you must apply for a public endpoint:
    • You access your RDS instance from an ECS instance that is located in a different region or has a different network type from your RDS instance.
    • You access your RDS instance from a device outside the Alibaba Cloud.
Note
  • The public endpoint and traffic are currently free of charge.
  • Using the public endpoint reduces security. Please exercise caution.
  • To guarantee high security and performance, we recommend that you migrate your application to an ECS instance that is located in the same region and has the same network type as your RDS instance and then use the internal endpoint.

PostgreSQL 11 High-availability Edition (with SSDs) or PostgreSQL 10 High-availability Edition (with SSDs)

  1. Log on to the PostgreSQL console.
  2. In the upper-left corner, select the region where the RDS instance is located.
    选择地域
  3. Find the RDS instance and click the instance ID.
  4. In the Basic Information section of the Basic Information page, click Apply for Public Endpoint and in the displayed dialog box click OK.
    申请外网地址

PostgreSQL 10 High-availability Edition (with local SSDs), PostgreSQL 10 Basic Edition, or PostgreSQL 9.4

  1. Log on to the RDS console.
  2. In the upper-left corner, select the region where the target RDS instance is located.
    选择地域
  3. Find the target RDS instance and click the instance ID.
  4. In the left-side navigation pane, click Database Connection.
  5. Click Apply for Public Endpoint.

    申请外网地址
  6. In the displayed dialog box, click OK.

    A public endpoint is generated.

  7. Optional. If you want to change the public endpoint or port, click Change Endpoint In the displayed dialog box, select a connection type and click OK.
    Note
    • The prefix of an endpoint starts with a lowercase letter and contains 8 to 64 characters including letters, digits, and hyphens (-).
    • In a VPC, you cannot change the port of an internal or public endpoint.
    • In a classic network, you can change the port of an internal or public endpoint.

    修改链接地址

APIs

API Description
AllocateInstancePublicConnection Used to apply for an internal endpoint for an RDS instance.