What is Amazon Verified Permissions?
Amazon Verified Permissions is a fully managed authorization service that evaluates access requests against policies written in the Cedar policy language. It provides real‑time, fine‑grained decisions for user‑driven and service‑to‑service interactions.
Why Use Verified Permissions?
- Fine‑grained control: Evaluate roles, attributes, transaction amounts, geographic locations, and custom context in a single decision.
- Scalable & low latency: Designed for thousands of requests per second with sub‑millisecond response times.
- Built‑in integration: Works natively with Amazon Cognito, API Gateway, Lambda authorizers, IAM, and DynamoDB.
- Auditable & compliant: Centralized policy store, versioning, and logging simplify governance and audit trails.
- Multi‑tenant support: Isolate policies per tenant while sharing a common architecture.
How to Implement Fine‑Grained Access Control
- Define a schema: Model entities (User, Transaction, Resource) and their attributes in Cedar.
- Create policies: Write Cedar rules that bind principals, actions, and resources (e.g., allow users with role ‘PaymentAdmin’ to modify payments ≤ $10,000).
- Integrate authentication: Use Amazon Cognito user pools; enrich JWTs with role and attribute claims via a pre‑token Lambda hook.
- Authorize requests: Configure API Gateway with a Lambda authorizer that extracts the JWT, calls Verified Permissions, and returns an IAM policy.
- Cache decisions: Leverage API Gateway’s built‑in cache and an application‑level cache to achieve sub‑millisecond latency.
How to Implement Multi‑Tenant Controls
- Per‑tenant policy store: Create a separate Verified Permissions policy store for each tenant to isolate policies and quotas.
- Tenant identifier: Add a custom
tenant_idclaim to Cognito tokens via a Lambda hook that looks up a DynamoDB mapping. - Tenant‑aware authorizer: The Lambda authorizer reads
tenant_id, selects the appropriate policy store, and evaluates the request. - Zero‑trust downstream: Pass the
tenant_idto backend services, which re‑validate with Verified Permissions before accessing tenant‑scoped data stores. - On‑boarding/off‑boarding: Provision a new policy store and Cognito pool for a tenant; delete both when the tenant leaves, ensuring clean isolation.
Common Architectural Pattern
- Client → Amazon Cognito (authentication & token enrichment)
- Cognito token → API Gateway
- API Gateway → Lambda authorizer (extract claims, call Verified Permissions)
- Verified Permissions → Decision (Allow/Deny) → IAM policy returned to authorizer
- API Gateway caches IAM policy → Backend service (optionally re‑validates)
Best Practices
- Keep policies declarative and version‑controlled; use CI/CD pipelines for updates.
- Limit attribute exposure in JWTs to the minimum required for authorization.
- Enable DynamoDB Streams or EventBridge to sync policy changes across stores.
- Monitor latency and error rates with Amazon CloudWatch metrics for Verified Permissions calls.
- Implement defense‑in‑depth: combine authorizer checks with backend zero‑trust verification.