All Products
Search
Document Center

PolarDB:Configure a security group

Last Updated:Jun 20, 2026

An ECS security group is a virtual firewall that controls inbound and outbound traffic for the ECS instances it contains. This topic describes how to configure a security group for a PolarDB cluster so that ECS instances in the security group can access the corresponding or cluster.

Use cases

After you create a cluster, you cannot access the cluster immediately. You must also add an ECS security group to the cluster whitelist so that the ECS instances in that security group can access the cluster.

Note
  • For more information about ECS security groups and how to configure them on the ECS console, see Create a security group.

  • You can also add individual IP addresses to the whitelist. Both whitelisted IP addresses and ECS instances in added security groups can access the or cluster.

Usage notes

  • You can add only an ECS security group that uses the same network type as your or cluster. For example, if your cluster is in a VPC, you can add only an ECS security group that is also in a VPC.

  • You can add a maximum of 10 security groups to a single or cluster.

  • When you associate a security group with a or cluster, PolarDB only adds the IP addresses of the ECS instances within that group to the cluster whitelist. The security group's own inbound or outbound rules are not applied to the cluster.

Procedure

  1. Log on to the PolarDB console. In the left-side navigation pane, click Clusters. Select the region where your cluster is located, and then click the ID of the target cluster.

  2. In the left-side navigation pane, choose Configuration and Management > Cluster Whitelist.

  3. On the Cluster Whitelist page, click Select a security group. Alternatively, to modify an existing security group, click Configuration in the Operation column for that group.

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

    PolarDB automatically adds the ECS instances from the selected security groups to the cluster whitelist and keeps it updated. You can select up to 10 security groups.

API reference

API

Description

DescribeDBClusterAccessWhitelist

Retrieves the IP address whitelist of a database cluster.

ModifyDBClusterAccessWhitelist

Modifies the IP address whitelist of a database cluster.