This topic describes how to add Elastic Compute Service (ECS) security groups to an ApsaraDB for Redis instance. Security groups facilitate client management and enhance connection security. A security group serves as a virtual firewall to limit the inbound and outbound traffic of the ECS instances that belong to this security group. After you add a security group to an ApsaraDB for Redis instance, all ECS instances in the security group are allowed to access the ApsaraDB for Redis instance.

Prerequisites

  • The major version of the ApsaraDB for Redis instance is Redis 4.0 or later. For more information about how to upgrade the major version, see Upgrade the major version.
  • The ECS instances where ApsaraDB for Redis clients are deployed are added to the security group. For more information, see Add an ECS instance to a security group.

Procedure

Note
  • Before you add a security group as a whitelist, make sure that the network types of the ApsaraDB for Redis instance and the ECS instances in the security group are the same. If the network types of the ApsaraDB for Redis instance and ECS instances are VPC, make sure that they are deployed in the same VPC.
  • You cannot add ECS security groups as whitelists for ApsaraDB for Redis instances deployed in the following regions: China (Heyuan), China (Guangzhou), China (Nanjing), and China (Ulanqab).
  1. Log on to the ApsaraDB for Redis console and go to the Instances page. In the top navigation bar, select the region in which the instance is deployed. Then, find the instance and click the instance ID.
  2. In the left-side navigation pane, click Whitelist Settings.
  3. Click Security Groups.
  4. On the Security Groups tab, click Add Security Group.
  5. In the dialog box that appears, select the security groups that you want to add as whitelists.
    Figure 1. Select security groups
    Select security groups
    Note
    • To identify a security group, you can move the pointer over the ID of the security group. Then, the name and description of the security group are displayed. If you move the pointer over the VPC icon, you can view the ID of the VPC.
    • You can add up to 10 security groups as whitelists to each ApsaraDB for Redis instance.
  6. Click OK.
  7. Optional: To remove all security groups, click Delete.