Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

IAM: Allows managing a group's membership programmatically and in the console

Focus mode
IAM: Allows managing a group's membership programmatically and in the console - AWS Identity and Access Management

This example shows how you might create an identity-based policy that allows updating the membership of the group called MarketingTeam. This policy defines permissions for programmatic and console access. To use this policy, replace the italicized placeholder text in the example policy with your own information. Then, follow the directions in create a policy or edit a policy.

What does this policy do?

  • The ViewGroups statement allows the user to list all the users and groups in the AWS Management Console. It also allows the user to view basic information about the users in the account. These permissions must be in their own statement because they do not support or do not need to specify a resource ARN. Instead the permissions specify "Resource" : "*".

  • The ViewEditThisGroup statement allows the user to view information about the MarketingTeam group, and to add and remove users from that group.

This policy does not allow the user to view or edit the permissions of the users or the MarketingTeam group.

{ "Version": "2012-10-17", "Statement": [ { "Sid": "ViewGroups", "Effect": "Allow", "Action": [ "iam:ListGroups", "iam:ListUsers", "iam:GetUser", "iam:ListGroupsForUser" ], "Resource": "*" }, { "Sid": "ViewEditThisGroup", "Effect": "Allow", "Action": [ "iam:AddUserToGroup", "iam:RemoveUserFromGroup", "iam:GetGroup" ], "Resource": "arn:aws:iam::*:group/MarketingTeam" } ] }
PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.