Managing IAM User Groups (Part 1)
To read part 2, please click here
Listing IAM User Groups
You can easily list all the user groups in your account, however, if you use AWS API or AWS CLI, then, the user groups will be listed with a particular path prefix.
To list all the user groups in your account
Do any of the following:
- AWS Management Console- Choose User groups in the navigation pane.
- AWS CLI- aws iam list-groups.
- AWS API- ListGroups.
To list the users in a specific user group
Do any of the following:
- AWS Management Console- Choose User groups, the group's name, and then Users tab, in the navigation pane.
- AWS CLI- aws iam get-group.
- AWS API- GetGroup.
To list all the user groups that a user is in
Do any of the following:
- AWS Management Console- Choose Users, the username, and then the Groups tab, in the navigation pane.
- AWS CLI- aws iam list-groups-for-user.
- AWS API- ListGroupsForUser.
Adding & Removing Users in an IAM User Group
User groups can be utilized to apply same permissions policies across multiple users at once; after that, users can be smoothly added or removed from an IAM user group, which can be helpful whenever people leave and enter your organization.
Add or Remove a User in a User Group (Console)
The AWS Management Console can be used to add or remove a user from a user group.
To add a user to an IAM user group (console)
- Firstly, sign-in to the AWS Management Console and open the IAM console at https://console.aws.amazon.com/iam/.
- Now, select the User groups and the group's name in the navigation pane.
- Choose the Users tab and then Add users. Choose the check box next to the users you would like to add.
- After that you can Add users.
To remove a user from an IAM group (console)
- You have to sign-in to the AWS Management Console and open the IAM console at https://console.aws.amazon.com/iam/.
- Now, you can select the User groups and the group's name in the navigation pane.
- Choose the Users tab and then Choose the check box next to the users you want to remove
- After that you can Remove users.
Add or Remove a User in a User Group (AWS CLI)
The AWS CLI can be used to add or remove a user from a user group.
To add a user to an IAM user group (AWS CLI)
In order to do that, use aws iam add-user-to-group command.
To remove a user from an IAM user group (AWS CLI)
In order to do that, use aws iam remove-user-from-group command.
Add or Remove a User in a User Group (AWS API)
The AWS API can be used to add or remove a user from a user group.
To add a user to an IAM group (AWS API)
In order to do that, perform AddUserToGroup operation.
To remove a user from an IAM user group (AWS API)
In order to do that, perform RemoveUserFromGroup operation.
To read part 2, please click here
Comments
Post a Comment