TL;DR: The governance issue is not speed alone but avoiding authorization drift when policy decisions are scattered across functions, according to Cerbos. Cerbos now supports running its PDP inside AWS Lambda as either a standalone function or an extension layer, with Cerbos Hub managing policy and audit logs centrally for consistent authorization across serverless, container, and VM workloads.
At a glance
What this is: Cerbos is extending policy-based authorization into AWS Lambda with both function and extension deployment options, aiming to keep authorization decisions consistent across serverless and non-serverless workloads.
Why it matters: This matters because IAM and security teams need a way to govern serverless authorization without embedding brittle logic in every function, especially when they also manage NHI and hybrid workload identity.
👉 Read Cerbos' guide to running authorization policy in AWS Lambda
Context
Serverless authorization is often the place where identity governance becomes inconsistent first. When policy logic is embedded inside individual Lambda handlers, teams lose central control, create duplicate rules, and make it harder to audit who was allowed to do what. For IAM and workload identity programmes, the real issue is not whether Lambda can enforce access, but whether enforcement stays governable as the environment scales.
Cerbos' model addresses that problem by separating policy administration from runtime decisions, while keeping the decision point close to the workload. That is relevant to serverless IAM, but it also maps to broader NHI governance: a policy engine only helps if the operating model keeps policy lineage, versioning, and auditability intact across distributed execution contexts.
Key questions
Q: How should security teams implement centralized authorization for serverless applications?
A: Security teams should separate policy management from application code and use a shared decision layer for all Lambda functions that need the same access rules. The key is to keep one policy source of truth, version changes, and preserve audit logs so access decisions can be explained consistently across the estate.
Q: Why do Lambda-based applications often suffer from authorization drift?
A: Authorization drift happens when each function or service embeds its own access logic, causing rules to diverge over time. As environments expand across serverless, containers, and VMs, teams lose consistency, make audits harder, and create exceptions that are difficult to detect or govern.
Q: What do security teams get wrong about externalized authorization in serverless?
A: Teams often assume externalized authorization is only about reducing code duplication, but the governance benefit is broader. It also improves change control, testing discipline, and traceability. If policy rollout and decision logging are not managed centrally, externalization still leaves a fragmented control model.
Q: Who is accountable when policy decisions are inconsistent across Lambda and containers?
A: Accountability sits with the identity or platform governance owner, because inconsistent decisions usually reflect a broken operating model rather than a single application defect. The framework must define who owns policy authorship, who approves exceptions, and who validates that the same rule behaves the same way everywhere.
Technical breakdown
Central policy control plane for serverless authorization
Cerbos Hub acts as the policy administration layer, while the Lambda-hosted PDP handles runtime decisions. That separation matters because serverless systems often replicate the same entitlement logic across many handlers, which creates policy drift and inconsistent enforcement. Central policy control lets teams version, test, and distribute rules without editing every function. In practice, this is an authorization architecture pattern, not just a deployment choice: the control plane holds policy intent, and the local decision point applies it where the request is made. That model can improve traceability, but only if policy distribution and audit logging remain consistent across all execution environments.
Practical implication: define one policy source of truth and require every Lambda to consume it through the same authorization workflow.
Lambda function versus extension layer for policy enforcement
Cerbos offers two deployment patterns in Lambda. The standalone function model centralizes decisions in a shared service that multiple Lambdas can call, which suits teams prioritising shared policy enforcement over absolute local latency. The extension layer model runs alongside the application function, which reduces network round trips and makes authorization behave more like an in-process call. The trade-off is operational: the extension shares memory and CPU with business logic, while the function model adds invocation overhead but keeps the PDP more isolated. Both patterns preserve externalized policy, but they optimize different parts of the serverless runtime.
Practical implication: choose the deployment pattern based on latency tolerance, concurrency needs, and whether shared runtime resources are acceptable.
Authorization drift in hybrid serverless and container estates
A common failure mode in modern estates is inconsistent authorization logic across Lambda, containers, and VMs. Teams often hardcode policy in one layer, externalize it in another, and then struggle to prove that the same access rule is enforced everywhere. Cerbos' distributed PDP model aims to remove that split by distributing the same policy bundles to each environment while keeping policy authorship centralized. For identity teams, the key insight is that authorization drift is a governance problem before it is a code problem. If policy lineage, rollout, and audit evidence differ by platform, the control model is already fractured.
Practical implication: map authorization decisions across all workload types and eliminate environment-specific policy exceptions unless they are formally approved.
NHI Mgmt Group analysis
Serverless authorization drift is the core governance problem, not Lambda itself. The article shows that teams lose control when authorization logic is duplicated inside functions instead of managed as a shared policy plane. That pattern creates inconsistent decisions, weak traceability, and hard-to-audit exceptions across workloads. For IAM and workload identity programmes, the real question is whether policy intent survives distribution across execution contexts.
The central concept here is authorization control-plane separation. Policy authorship, testing, rollout, and audit logging belong in one governed layer, while runtime enforcement belongs as close to the workload as possible. Cerbos' Lambda patterns illustrate that separation clearly, and the practical value is consistency across serverless, containerised, and VM-based services. Teams should treat this as an identity architecture requirement, not an implementation preference.
Unified policy does not remove operational risk unless the runtime model is still manageable. A central policy plane can improve governance, but only if teams understand the cost of cold starts, shared resource contention, and distribution latency. The lesson for practitioners is that policy centralisation and runtime locality must be balanced deliberately, especially in environments that mix event-driven workloads with long-lived services.
Hybrid estates expose a lifecycle gap in authorization governance. Policies now need to move with workloads across platforms, but many programmes still review access and enforcement in platform silos. That assumption was designed for slower-moving, environment-specific controls. It fails when the same identity decision must be replicated across Lambda, containers, and VMs. The implication is that governance models must follow the policy lifecycle, not just the application lifecycle.
Auditability becomes a design constraint when authorization is externalised. Central logging only helps if policy versions, decision outputs, and rollout history remain tied together. That is the difference between having logs and having evidence. Practitioners should treat policy lineage as part of identity control, because without it, distributed authorization becomes operationally opaque even when the runtime decisions are technically correct.
From our research:
- Organisations maintain an average of 6 distinct secrets manager instances, creating fragmentation that undermines centralised control, according to The State of Secrets in AppSec.
- Only 44% of developers are reported to follow security best practices for secrets management, exposing a significant developer behaviour gap.
- That fragmentation is why practitioners should review NHI Lifecycle Management Guide alongside policy distribution and audit design, not as a separate secret-only problem.
What this signals
Authorization drift will become more visible as serverless estates mature. The important signal is not whether teams can centralize policy, but whether they can prove that the same access decision is enforced identically across Lambda, container, and VM contexts. That is a governance test, not just a runtime test, and it belongs in the same control conversation as workload identity and policy lineage.
Policy lineage is becoming a control surface in its own right. If teams cannot reconstruct which policy version produced a decision, auditability is incomplete even when the access outcome was correct. For practitioners, that means policy rollout, logging, and exception handling should be treated as one operating process rather than three separate tasks.
With 43% of security professionals concerned about AI systems learning and reproducing sensitive information patterns from codebases, per The State of Secrets in AppSec, the wider lesson is that distributed logic leaks governance as readily as it leaks secrets. Serverless authorization needs the same discipline that NHI programmes apply to rotation, offboarding, and control ownership.
For practitioners
- Separate policy from application code Move entitlement logic out of individual Lambda handlers and into a centrally managed policy plane so rule changes do not require redeploying every function. Keep one source of truth for policy authoring, versioning, testing, and rollout.
- Select the Lambda deployment pattern by control objective Use the standalone function model when shared enforcement matters more than local latency, and use the extension layer when low-latency, in-context decisions are the priority. Document the decision so architecture and governance teams agree on the trade-off.
- Track authorization drift across workload types Compare decisions for the same principal and resource across serverless, container, and VM environments to confirm that policy bundles produce identical outcomes. Investigate any platform-specific exception as a governance issue, not just an application bug.
- Preserve policy lineage in audit evidence Retain policy versions, rollout timestamps, and decision logs together so reviewers can reconstruct why an access decision was made. Without that chain of evidence, central logging does not deliver meaningful auditability.
Key takeaways
- Serverless authorization becomes a governance problem when access logic is copied into every function instead of managed as a shared policy plane.
- Cerbos' Lambda patterns highlight the trade-off between centralized enforcement and low-latency local decisions, which matters in mixed workload estates.
- Teams need policy lineage, audit evidence, and consistent decision behaviour across serverless and non-serverless workloads to avoid authorization drift.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP Non-Human Identity Top 10 address the attack and risk surface, while NIST CSF 2.0 and NIST Zero Trust (SP 800-207) set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Non-Human Identity Top 10 | NHI-03 | Covers lifecycle control for non-human authorization components in distributed runtimes. |
| NIST CSF 2.0 | PR.AC-1 | Policy-controlled access in serverless environments aligns with identity and access management governance. |
| NIST Zero Trust (SP 800-207) | AC-4 | Central policy enforcement supports zero-trust style decisioning at the workload boundary. |
Map Lambda authorization flows to access-control ownership and verify consistent enforcement across workloads.
Key terms
- Policy control plane: A policy control plane is the layer where access rules are authored, tested, versioned, and distributed to enforcement points. In serverless environments, it prevents every function from becoming its own authority and creates a single governance record for authorization decisions.
- Authorization drift: Authorization drift is the gradual divergence of access decisions across systems that are meant to enforce the same rules. It usually appears when teams hardcode logic in different services, making outcomes inconsistent, difficult to audit, and expensive to reconcile across platforms.
- Policy lineage: Policy lineage is the traceable history of a policy from authoring through rollout and enforcement. It matters because identity governance is not only about whether a decision was correct, but also about whether the organisation can prove which rule produced it and why.
- Lambda extension layer: A Lambda extension layer is code that runs alongside a Lambda function in the same execution environment. For authorization, it can reduce network overhead and make policy checks behave more like a local call, but it also shares runtime resources with application logic.
Deepen your knowledge
NHI governance, agentic AI identity, and machine identity security are core topics in our NHI Foundation Level course, the industry's only accredited NHI security programme. If you are responsible for identity security strategy or NHI governance in your organisation, it is worth exploring.
This post draws on content published by Cerbos: Serverless architectures bring speed and agility, but authorization often remains a weak point. Read the original.
Published by the NHIMG editorial team on 2025-10-30.
NHI Mgmt Group — the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org