In the ECS console, you can add an instance to one or more security groups. Each ECS instance can join up to five security groups.

Procedure

  1. Log on to the ECS console.
  2. In the left-side navigation pane, click Instances.

  3. Select a region.
  4. Select the target instance. Click the instance name or click Manage to the right of the instance to go to its Instance Details page.
  5. Click Security Groups in the left-side navigation pane.

  6. Click Add to Security Group.

  7. Select the security group that you want to join. If you need to join multiple security groups, select a security group and then click Join multiple security groups. A selection box appears that shows the selected security groups.

  8. Click OK.

After the instance is added to the security group, the rules of that security group apply to the instance automatically.