- Newest
- Most votes
- Most comments
Managing IAM Policy Limits with Tag-Based Access Control
You're facing a common challenge with IAM policy management when scaling across multiple departments and resources. Let me address your questions about tag-based access control and policy consolidation.
Tag-Based Access Control Limitations
You've correctly identified a key limitation: many Describe* and List* actions in AWS services don't support tag-based conditions. This is by design, as these operations are typically needed to discover resources before performing actions on them.
Recommended Approaches
-
Separate Read vs. Write Policies: Continue using a tag-based approach for write/modify operations while having broader read-only permissions. This aligns with your current policy structure where you're using tag conditions for ModifyDBParameterGroup but not for Describe* actions.
-
Attribute-Based Access Control (ABAC): Expand your tag strategy to implement a full ABAC model. This allows you to grant permissions in bulk to resources with certain tags rather than creating separate policies for each resource type.
-
Resource-Specific Policies with Higher Granularity: Instead of having many small policies, create fewer, more comprehensive policies organized by function rather than by department.
Best Practices for Tag-Based Access Control
-
Use the appropriate condition keys:
-
aws:PrincipalTagto compare tags attached to the calling principal -
aws:RequestTagto compare tags passed in the request -
aws:ResourceTagto compare tags attached to the accessed resource -
aws:TagKeysto control which tag keys can be used -
Avoid using
ResourceTagcondition keys with theiam:PassRoleaction as this approach doesn't provide reliable results. -
For Global Accelerator and similar services where tagging is limited to specific resources, understand which resources can be tagged before implementing tag-based policies.
Alternative Strategies to Avoid the 20-Policy Limit
-
Consolidate by Function: Group permissions by functional area rather than department (e.g., "DatabaseManagement", "CacheManagement").
-
Use Permission Boundaries: Set permission boundaries on roles to limit maximum permissions while using fewer attached policies.
-
Inline Policies for Role-Specific Permissions: Use inline policies for unique permissions and managed policies for common permissions.
-
Review and Refactor Existing Policies: Analyze your current policies to identify redundancies and consolidate overlapping permissions.
By implementing these strategies, you can maintain proper access control while working within the IAM policy limits. The tag-based approach you're developing can work well for write operations, while accepting that read operations may need broader permissions.
Sources
Controlling access to and for IAM users and roles using tags - AWS Identity and Access Management
Controlling access to AWS resources using tags - AWS Identity and Access Management
Using tags in IAM permission policies - Tagging AWS Resources and Tag Editor
Using tag-based policies with AWS Global Accelerator - AWS Global Accelerator
Relevant content
asked 2 years ago
asked 3 years ago
asked a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 6 months ago
