1.First, log in to your local machine and open the CLI, or open AWS CloudShell.
2.List the users. If no users are created, please create them first and then perform the operations. To list the users, use the following command:
Command – # aws iam list-users
3.Now, let’s check the created group. Use the following command to list the groups:
Coammds – # aws iam list-groups
4.Next, add two users to the selected group (cloudteam). Use the following command:
Command – # aws iam add-user-to-group –user-name <user-name> –group-name <group-name>
5.Now, check if the users have been added to the same group. Use the following command to verify:
Command – # aws iam get-group –group-name <group-name>
6.Pls check on console.
END