An ECS security group is a virtual firewall that controls inbound and outbound traffic for its ECS instances. This topic describes how to configure a security group for a PolarDB cluster, allowing ECS instances in that group to access the PolarDB for PostgreSQL or cluster.
Use cases
After you create a PolarDB for PostgreSQL cluster, the cluster is temporarily inaccessible. You must add an ECS security group to the PolarDB for PostgreSQL cluster whitelist. Then, the ECS instances in that security group can access the PolarDB for PostgreSQL cluster.
-
For more information about ECS security groups and how to configure them in ECS, see Create a security group.
-
You can also configure the IP address of an ECS instance in the whitelist, and ECS instances in either an IP whitelist or a security group can access the PolarDB for PostgreSQL cluster.
Usage notes
-
You can add only an ECS security group with the same network type as your PolarDB for PostgreSQL or cluster. For example, if your cluster is in a VPC, you can add only a VPC-type ECS security group.
-
You can add a maximum of 10 security groups to a single PolarDB for PostgreSQL or cluster.
-
When you configure a security group for a PolarDB for PostgreSQL or cluster, the system adds only the IP addresses of the ECS instances in the security group to the cluster whitelist. The cluster does not apply the ECS security group rules.
Procedure
-
Log on to the PolarDB console. In the left-side navigation pane, click Clusters. Select the region where the cluster is deployed, and then click the ID of the target cluster to open the cluster details page.
-
In the left-side navigation pane, click .
-
On the Cluster Whitelist page, click Select a security group, or click Configuration in the Operation column for a security group.

-
In the Select a security group dialog box, select one or more target security groups, and then click OK.

API reference
|
API |
Description |
|
Queries the IP addresses that can access the database cluster. |
|
|
Modifies the IP addresses that can access the database cluster. |