This topic describes how to modify a security group rule. Improper configurations of security group rules can result in serious security risks. You can modify rules in a security group based on your needs to ensure the network security of Elastic Compute Service (ECS) instances in the security group.

Procedure

  1. Log on to the ECS console.
  2. In the left-side navigation pane, choose Network & Security > Security Groups.
  3. In the top navigation bar, select a region.
  4. Find the security group whose rules you want to modify, and then click Add Rules in the Actions column.
  5. Select the direction of security group rules.
    • If the security group resides in a virtual private cloud (VPC), click the Inbound or Outbound tab.
    • If the security group resides in the classic network, click the Inbound, Outbound, Internet Ingress, or Internet Egress tab.
  6. Find the security group rule that you want to modify and click Modify in the Actions column.
  7. After you modify the security group rule, click OK.
    The modified security group rule immediately takes effect on the ECS instances in the security group.

References

You can call the ModifySecurityGroupRule operation with a rule ID to modify an inbound security group rule, and call the ModifySecurityGroupEgressRule operation with a rule ID to modify an outbound security group rule.