OpsCanary
Back to daily brief
awsiamPractitioner

Mastering Permissions Boundaries in IAM: What You Need to Know

5 min read AWS DocsApr 21, 2026
PractitionerHands-on experience recommended

Permissions boundaries exist to help you control the maximum permissions that an IAM entity can have. This is crucial in environments where you need to enforce strict security policies while still allowing some flexibility for users and roles. By defining a permissions boundary, you can ensure that even if a user has an identity-based policy that grants extensive permissions, they cannot exceed the limits set by the boundary. This feature is particularly valuable in large organizations where multiple teams may have overlapping access needs.

The mechanism behind permissions boundaries is straightforward. When you attach a permissions boundary to an IAM entity, it effectively limits the permissions granted by all policies affecting that entity. The effective permissions are determined by the combination of identity-based policies, resource-based policies, session policies, and AWS Organizations Service Control Policies (SCPs). For example, if you have a permissions boundary that allows only certain actions on S3 and EC2, even if a user has a policy that grants broader access, they will be restricted to the actions defined in the boundary. This layered approach to permissions helps maintain a secure environment while still enabling necessary access.

In production, you need to be cautious about how you implement permissions boundaries. One significant gotcha is related to resource-based policies that include a NotPrincipal element with a Deny effect. If you attach a permissions boundary to an IAM user or role, this Deny effect will always take precedence, effectively blocking access regardless of the intended permissions. Always test your policies in a controlled environment before deploying them broadly to avoid unexpected access issues.

Key takeaways

  • Define permissions boundaries to limit maximum permissions for IAM entities.
  • Understand that effective permissions are influenced by multiple policy types.
  • Avoid using NotPrincipal with Deny effects in resource-based policies for entities with permissions boundaries.
  • Test your IAM policies in a safe environment to prevent access issues.
  • Leverage permissions boundaries for enhanced security in large organizations.

Why it matters

In production, using permissions boundaries can prevent privilege escalation and ensure compliance with security policies. This is especially critical in multi-team environments where access needs can conflict.

Code examples

JSON
{"Version":"2012-10-17","Statement": [{"Effect": "Allow","Action": ["s3:*","cloudwatch:*","ec2:*"],"Resource": "*"}]}
JSON
{"Version":"2012-10-17","Statement":{"Effect": "Allow","Action": "iam:CreateUser","Resource": "*"}}

When NOT to use this

The official docs don't call out specific anti-patterns here. Use your judgment based on your scale and requirements.

Want the complete reference?

Read official docs

Test what you just learned

Quiz questions written from this article

Take the quiz →

Get the daily digest

One email. 5 articles. Every morning.

No spam. Unsubscribe anytime.