Join our Newsletter — 33% off our NHI Course

How do you secure AWS Lambda function URLs with authentication?

Secure AWS Lambda function URLs by requiring authentication rather than public access, and grant invoke permissions only to the identities that need them. Use resource-based permissions, review who can call the URL, and separate internal and external functions. Monitor invocations for unexpected sources, and avoid exposing business logic directly without rate limiting and logging.

How Lambda function URL authentication should be structured

A Lambda function URL is easiest to secure when you treat it as an explicit API surface, not as a convenience endpoint. Authentication should be required at the URL level, and invoke permission should be scoped to the smallest set of principals that truly need it. For serverless-specific patterns, Serverless Security Guide is the natural starting point for how function URLs, permissions, and logging fit together.

The practical decision is whether the function should be callable by authenticated AWS identities, by an application in another account, or by no external caller at all. If the function serves internal workflows, keep it behind authenticated access and resource-based policy. If it serves external users, put a stronger access layer in front of it and do not rely on obscurity or an unsigned URL as a control.

Auth on its own does not make a function URL safe. You also need to think about what the function can do once invoked, because the execution role and any downstream AWS permissions define the real blast radius. Separate internal and external functions so that internet-facing entry points do not inherit the same permissions, secrets exposure, or operational trust as internal-only handlers.

What to verify before you trust the URL

Start by confirming the function URL is not configured for public invocation unless that is a deliberate design choice. Then verify who can call it, which IAM principals or roles are permitted, and whether the permission scope matches the business use case. If the function is meant for cross-account or service-to-service access, validate the calling identity and the resource-based permission together, not separately.

Also verify that the URL is not the only control protecting sensitive business logic. A secure design keeps rate limiting, logging, and anomaly detection around the function because authenticated requests can still be abusive, automated, or compromised. The endpoint should be observable enough that you can distinguish normal application traffic from unexpected invocation patterns.

When the function performs privileged actions, the permission model should be as narrow as possible. That means one function should not be able to invoke broad downstream capabilities unless those capabilities are strictly required. The strongest security outcome is usually a small set of tightly scoped callers, a narrowly scoped execution role, and explicit separation between test, internal, and production endpoints.

How to reduce exposure when authentication is not enough

If the function URL must exist, design it as though it will be discovered and probed. That means keeping unauthenticated access off by default, using least privilege for invoke permissions, and avoiding business logic that assumes callers are benign. External-facing Lambda URLs are especially sensitive because they can become direct entry points into backend workflows.

Monitoring matters because the first sign of a problem may be an unusual source, invocation burst, or a caller that should never have been able to reach the URL. If you see unexpected call patterns, treat them as an access review problem as much as an application problem. For broader serverless compromise patterns and why function-level exposure is often underestimated, the Dropbox Sign breach 2024 and the Microsoft Midnight Blizzard breach both show how abuse of backend trust or weak authentication can turn a single access path into wider exposure.

For the caller side, the right posture is usually authenticated, narrowly scoped, and revocable. The more sensitive the function, the more you should prefer short-lived and tightly controlled access over long-lived or shared credentials. For identity-layer guidance on strong sign-in and authenticated access patterns, NIST SP 800-63 Digital Identity Guidelines is the clearest external reference in the supplied set.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

NIST SP 800-53 Rev 5 and OWASP ASVS set the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
NIST SP 800-53 Rev 5 IA-9 — Identification and Authentication (Non-Organizational Users) Lambda URLs often authenticate services or external callers, so caller authentication is central.
AC-6 — Least Privilege Invoke permissions and downstream access should be narrowly scoped to limit function blast radius.
AU-2 — Event Logging Unexpected URL use must be detectable through invocation and access logging.
Recommendation — Require authenticated invocation and verify the caller's identity before granting function access. Limit Lambda invoke and execution permissions to the minimum needed for the use case. Log function URL access and review unusual invocation sources or patterns.
OWASP ASVS V4 — API and Web Service A Lambda function URL is an API surface that needs authentication and access control checks.
V16 — Security Logging and Error Handling Function URLs need logging to spot abuse, probing, and unexpected callers.
Recommendation — Apply API access controls and authentication requirements to the function URL. Record and monitor request sources, failures, and abnormal invocation patterns.

Practitioner Guidance

What to prioritise: Treat invoke permission and caller identity as the primary control, then harden observability and blast-radius limits around it. If the URL can reach sensitive data or privileged downstream actions, assume it deserves the same scrutiny as any other production-facing API.

Decision rule: If a function URL is only for internal automation, keep it authenticated and tightly permissioned; if it is internet-facing, add a stronger front door and do not expose the function as a raw business endpoint. If the function cannot be meaningfully rate limited or logged, it is not ready for broad exposure.

Common mistake: Teams often check the authentication setting and stop there. In practice, the larger failure is forgetting that the function’s execution role, downstream permissions, and source monitoring determine whether a valid caller can still cause disproportionate damage.

Practitioner takeaway: Secure Lambda function URLs by treating authentication as necessary but not sufficient, then verify who can invoke the function, what the function can reach, and how quickly you can detect misuse.