Suppose you have 10 ECS instances. You want to authorize 5 of them to the dev team and another 5 to the ops team. You want each team to see only authorized instances.
To authorize ECS instances by group, perform these steps:
Tag ECS instances by group. For example, tag 5 of them with the key as team and the value as dev; tag another 5 with the key as team and the value as ops.
Tag one instance as follows:
In the ECS console, choose an instance and click the corresponding drop-down menu More on the Instances sub-page.
Select Edit Tag from the drop-down menu.
In the Edit Tag dialog box, click Create and then set key and value. Here, we set key to team and value to dev.
Create two user groups, such as dev and ops. Then create corresponding user accounts for your employees and add different user accounts to different user groups.
Create two custom authorization policies and assign them to different user groups.
For example, the name of the custom authorization policy assigned to the dev group is
policyForDevTeam. The policy content is as follows:
Note: If your custom tag is different from the one in the preceding example, replace the description of the tag conditions in the example accordingly.
If no instance is displayed after you log on to the ECS console, click Tag in the Instances sub-page.
Select the specified Tag Key to display authorized instances.