SkillSprout
Chapter 3 · Lesson 2
Beginner
7 min read

Groups

Overview

An IAM group is a collection of IAM users. Instead of attaching the same permissions to dozens of individual users, you attach policies once to the group and every member inherits them. When someone changes team, you simply move them between groups.

Think of a group as a job title: "Developers", "Auditors", "DBAdmins". The title carries a set of permissions, and people holding that title get them automatically. This makes permissions easier to review, audit and keep consistent, which is why groups are the recommended way to manage IAM user permissions.

Groups are intentionally simple — they cannot be nested, cannot sign in and cannot be referenced as a principal in resource policies — and the exam likes to test those limitations.

Key Concepts

  • A group is a container for IAM users — it is not an identity that can sign in or make API calls.
  • Policies attached to a group apply to every member: managed policies (AWS or customer) and inline policies (up to 5,120 characters).
  • A user can belong to multiple groups (up to 10); permissions from all groups are combined (union).
  • Groups cannot be nested: no groups inside groups.
  • A group cannot be a principal in a resource-based policy (e.g. an S3 bucket policy); you must name users or roles.
  • Default quota: 300 groups per account (adjustable).
  • A new group has no permissions; an explicit Deny in any group policy overrides allows from other groups.
  • Users don't have to belong to a group, but it is a best practice to assign permissions through groups.

Detailed Notes

Why use groups?

Without groups, giving 40 developers read access to a bucket means attaching a policy 40 times — and remembering to update all 40 when requirements change. With a group you attach once. Auditors then answer "who can do X?" by reading a few group policies.

ApproachMaintenanceAuditRisk
Policies on each userHigh: N attachmentsHardDrift, forgotten permissions
Policies on groupsLow: one placeEasyConsistent permissions

How permissions combine

A user's effective permissions are the union of:

  1. Policies attached directly to the user (including inline).
  2. Policies attached to every group the user belongs to.
  3. Then subject to any permission boundary, SCP or session policy that restrict it.

An explicit Deny in any of those statements wins over every Allow.

text
alice  --member of-->  Developers  (AmazonEC2ReadOnlyAccess)
       --member of-->  S3Uploaders (custom S3 PutObject policy)
Effective: EC2 read-only  UNION  S3 PutObject

Common group design (role-based)

GroupTypical policies
AdministratorsAdministratorAccess (limited membership, MFA required)
DevelopersPowerUserAccess or service-specific access in dev accounts
Auditors / SecuritySecurityAudit, ViewOnlyAccess, read-only CloudTrail
Billing / FinanceBilling, AWSBudgetsReadOnlyAccess
DBAdminsjob-function/DatabaseAdministrator
NetworkAdminsjob-function/NetworkAdministrator

AWS provides job-function managed policies (such as job-function/SystemAdministrator) that map to common roles.

Working with groups in the CLI

bash
# Create a group and attach an AWS managed policy
aws iam create-group --group-name Developers
aws iam attach-group-policy --group-name Developers \
  --policy-arn arn:aws:iam::aws:policy/PowerUserAccess

# Add and remove members
aws iam add-user-to-group --group-name Developers --user-name alice
aws iam remove-user-from-group --group-name Developers --user-name alice

# See who is in the group and what it grants
aws iam get-group --group-name Developers
aws iam list-attached-group-policies --group-name Developers

A group policy requiring MFA

json
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "AllowEverythingWhenMfaPresent",
      "Effect": "Allow",
      "Action": "ec2:*",
      "Resource": "*",
      "Condition": { "Bool": { "aws:MultiFactorAuthPresent": "true" } }
    },
    {
      "Sid": "DenyDeleteWithoutMfa",
      "Effect": "Deny",
      "Action": ["ec2:TerminateInstances", "ec2:DeleteVolume"],
      "Resource": "*",
      "Condition": { "BoolIfExists": { "aws:MultiFactorAuthPresent": "false" } }
    }
  ]
}

Group limitations (heavily tested)

LimitationConsequence
No nestingYou cannot model hierarchies (e.g. "All-Engineers" containing "Backend"). Add users to each needed group or use Identity Center.
Not a principalA bucket policy cannot say "Principal": {"AWS": "arn:...:group/Developers"}. Attach a policy to the group instead, or list roles.
Cannot assume/sign inGroups don't have credentials.
10 groups per userDesign groups so each user needs at most ten.
300 groups per accountRequest an increase or move to Identity Center permission sets for large directories.

Groups vs. roles vs. Identity Center

  • Groups organise IAM users inside one account.
  • Roles are assumed temporarily by users, services or external identities, and work cross-account.
  • IAM Identity Center groups are synchronised from your identity provider and mapped to permission sets across many accounts — this scales better than per-account IAM groups.

Naming and governance tips

  • Use role-oriented names (Developers, ReadOnlyAuditors) rather than person names.
  • Keep AdministratorAccess membership small and monitored with CloudTrail/EventBridge alerts on AddUserToGroup.
  • Add a permission boundary to groups that delegate IAM administration so delegated admins cannot escalate.

Real World Example

Scenario — a 150-person software company cleans up permissions.

A software firm grew organically: each engineer had policies attached directly to their IAM user, and nobody could say who could delete production databases. An audit flagged 37 users with AdministratorAccess.

The cloud team defines five groups — Developers, QA, DBAdmins, Auditors and PlatformAdmins — and attaches AWS managed job-function policies plus a few customer managed policies (e.g. S3 access limited to the artifacts/ prefix). All direct user policies are removed. Only four people remain in PlatformAdmins, which also carries a policy that denies every action unless MFA is present.

When a developer moves to the data team, HR's ticket triggers one change — remove from Developers, add to DBAdmins — and all permissions follow. During the next audit the security team reads five group policies instead of 150 user policies, and EventBridge alerts whenever someone is added to PlatformAdmins.

Architecture Diagram

Groups assigning permissions to users
Architecture
AWS Cloud
AWS account
Alice
Bob
Carol
Developers
DBAdmins
PowerUserAccess
DatabaseAdministrator

Policies are attached to groups; users inherit the union of all their groups' permissions.

  1. 1Administrators create groups that mirror job functions.
  2. 2Managed or inline policies are attached to the groups, not to individual users.
  3. 3Users are added to one or more groups and inherit the combined permissions.
  4. 4Moving a person to another team only requires changing their group membership.

Best Practices

  • ✓Assign permissions to groups, not users, so access is consistent and auditable.
  • ✓Model groups on job functions and use AWS job-function managed policies as a starting point.
  • ✓Keep membership of powerful groups small (Administrators) and alert on membership changes.
  • ✓Combine groups with MFA conditions to protect privileged actions.
  • ✓Prefer IAM Identity Center groups and permission sets for multi-account, large-scale workforce access.
  • ✓Use customer managed policies so one policy can be reused by several groups and versioned.
  • ✓Review group policies regularly with Access Advisor and Access Analyzer to remove unused permissions.
  • ✓Remember users in several groups get a union of permissions — check for unintended combinations and explicit denies.

Common Interview Questions

Exam Tips

SAA-C03 focus

  • Groups contain users only — no nesting, no credentials, cannot be a Principal in resource policies.
  • Permissions via multiple groups are additive, but an explicit Deny wins.
  • "Easily manage permissions for many users with the same job" -> IAM groups with attached policies.
  • A user can be in up to 10 groups; an account can have 300 groups by default.
  • A group cannot assume a role itself; members need an sts:AssumeRole permission attached to the group or user.
  • For many accounts and a corporate directory -> IAM Identity Center, not per-account IAM groups.
  • AWS job-function policies (e.g. job-function/DatabaseAdministrator) are the intended way to map groups to job roles.

Finished this lesson?

0 of 64 lessons done · 0% of the course