All Products
Search
Document Center

ApsaraDB RDS:Configure a security group for an ApsaraDB RDS for PostgreSQL instance

Last Updated:Jun 02, 2026

Associate ECS security groups with your RDS PostgreSQL instance to grant all ECS instances in those groups access to the RDS instance.

Background

A newly created RDS instance blocks all external access. To allow connections, configure at least one of the following:

You can use both methods together. Access is then granted to all whitelisted IP addresses and all ECS instances in the associated security groups.

ECS security groups are described in Create a security group.

Prerequisites

  • An ApsaraDB RDS for PostgreSQL instance is created.

  • An ECS security group exists with the same network type (VPC or classic network) as the RDS instance.

Limits

Item Limit
Maximum security groups per RDS instance 10
Network type The security group and the RDS instance must use the same network type (VPC or classic network).

Note: If you change the network type of your RDS instance, all previously configured security groups become invalid. Reconfigure security groups to match the new network type.

Procedure

  1. Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.

  2. In the left-side navigation pane, click Whitelist and SecGroup. On the page that appears, click the Security Group tab.
  3. Click Add Security Group.
    Note Security groups followed by a VPC tag contain ECS instances that reside in virtual private clouds (VPCs).
    Security Group
  4. Select the security group that you want to add, and then click OK.

Next steps

Create a database and an account

Related operations

Operation Description
DescribeSecurityGroupConfiguration Queries details about the ECS security groups that are associated with an instance.
ModifySecurityGroupConfiguration Modifies details about the ECS security groups that are associated with an instance.