View a markdown version of this page

SEC03-BP02 Use scalable and centralized permissions management in your workload - AWS Well-Architected Framework

SEC03-BP02 Use scalable and centralized permissions management in your workload

When you have a workload with rich authorization needs, you must decide who can access and modify resources, often under changing conditions. When that logic lives inside application code or a custom database table, it drifts out of sync across components and becomes hard to audit or change. Manage permissions through a centralized, policy-based authorization service instead, so decisions stay consistent and reviewable as the workload grows.

Desired outcome:

  • Your workload evaluates authorization through a centralized service rather than logic scattered across components.

  • Your permission decisions are consistent for the same principal and action regardless of which component handles the request.

  • Your authorization policies are versioned and auditable, so you can see what changed, when, and by whom.

  • Your authorization model expresses access as roles, attributes, or policies that scale without per-user maintenance.

Common anti-patterns:

  • Teams build custom authorization logic instead of using a managed service.

  • Permission rules are hard-coded in application code or stored in a database table.

  • Each component manages its own permissions, so the same principal is evaluated differently in different places.

  • Different parts of the workload use different authentication and authorization mechanisms.

  • Authentication and authorization logic are entangled, with no clear separation between them.

  • Access relies only on coarse-grained rules and ignores role-based, attribute-based, or policy-based control.

Benefits of establishing this best practice:

  • Consistent access decisions across components reduce the risk of a gap that grants unintended access.

  • A single policy store gives you one place to audit and change permissions.

  • Externalizing authorization from code lets you adjust access without redeploying the workload.

  • Policy-based models scale to new features and tenants without rewriting permission logic.

  • Separating authentication from authorization makes each easier to reason about and test.

Level of risk exposed if this best practice is not established: High

Implementation guidance

Authorization becomes expensive when it exists in application code. Each service ends up with its own copy of the rules, the copies diverge over time, and no single place fully explains your access patterns. Auditing a permission means reading source across every component, and changing a rule means a code change and a deployment. Centralize authorization by treating permissions as data that a dedicated service evaluates, so every component queries the same authority.

Not every workload needs this. Coarse-grained access, where a role either can or cannot reach a whole service, is simpler and often enough for internal tools with stable requirements. The investment pays off when access is dynamic, such as for delegated permissions, temporary sharing, per-tenant isolation, or conditions that depend on request context. Those cases are where scattered logic fails, because rules change faster than code review can keep up. Match the mechanism to the requirement rather than defaulting to the most powerful model.

Before choosing a service, define an authorization model: the set of principals, the actions they perform, the resources they act on, and the conditions that qualify access. Identify the roles and attributes that recur across those rules, because they determine which access-control style fits. Role-based access control groups permissions by job function and works well when access maps cleanly to a manageable set of roles. Attribute-based access control derives access from attributes on the principal and resource, which scales as those populations grow without adding new roles. Policy-based access control expresses rules as explicit policies evaluated at request time, which suits fine-grained decisions over your application's own resources. Many workloads combine them.

Authentication establishes who the caller is, while authorization decides what actions they can take. Keep them separate, where a centralized identity source performs authentication and a policy service performs authorization. Each concern stays testable on its own.

On AWS, Amazon Cognito manages user identities and supports role-based and attribute-based access control when a workload acts on AWS resources for a user. For fine-grained decisions over your application's own resources, Amazon Verified Permissions is a policy-based service that returns an allow-or-deny decision from a runtime query and keeps policies in one auditable store. Reevaluate the model periodically, because access requirements change as the workload adds features and tenants.

When your workload provides workforce access to data through AWS analytics services rather than serving external end users, centralize those permissions against the corporate identity, not a shared service role. Trusted identity propagation in IAM Identity Center carries the signed-in user's identity through services such as Amazon Redshift, AWS Quick, Amazon Athena, and Amazon EMR. Define fine-grained permissions once in AWS Lake Formation or Amazon S3 Access Grants, and each service authorizes and audits access against the user or their group. See SEC02-BP04 Rely on a centralized identity provider for users and machines for the identity-provider side of this pattern.

Implementation steps

  1. Define your authorization model: Enumerate the principals, actions, resources, conditions, roles, and attributes that govern access in your workload. Write the access rules in plain terms first, then translate them into policies or technical guidelines. This model drives every later decision, so keep it explicit rather than implied by code.

  2. Choose an authorization strategy: Match the model to a mechanism. Use Amazon Cognito user pools for user management and authentication, and use Amazon Verified Permissions for fine-grained, policy-based authorization over application resources.

  3. Centralize user and identity management: Manage principals through one unified service across all components, so user attributes and entitlements have a single source of truth. This prevents the same principal from resolving to different permissions in different parts of the workload.

  4. Define authorization policies centrally: Express access as roles, attributes, or policies, and store them in Amazon Verified Permissions. Use attribute-based rules to scale permissions from principal and resource attributes rather than enumerating access per user.

  5. Add enforcement points to your components: Place authorization checks where components handle requests. For access to AWS resources, use Amazon Cognito identity pools to obtain temporary AWS credentials for authenticated users. For application resources, call the Verified Permissions authorization API to evaluate each decision and enforce the result in your code.

  6. Monitor authorization decisions: Track allow and deny outcomes with Amazon CloudWatch and log decisions to maintain an audit trail. Use these signals to spot misconfigured policies and to troubleshoot access issues without loosening rules blindly.

Resources

Related best practices:

Related documents:

Related examples:

Related tools: