Skip to content
Technical 15 min read · 3,300 words

Serverless Zero Trust: Connecting AWS Lambda and Cloud Functions to Private Resources

A practical deep dive into serverless zero trust: connect AWS Lambda and Cloud Functions to private VPC databases and APIs with WireGuard mesh and ABAC policy.

By QuickZTNA Engineering · Cloud & Infrastructure Architecture
WireGuard Zero Trust GDPR

Executive Summary & TL;DR

Serverless functions are the most common place zero trust quietly breaks. AWS Lambda and Google Cloud Functions are, by default, internet-only: they can reach the public internet but cannot reach your private VPC, your internal database, or your on-premises service unless you wire them into a private network. The standard fix—putting the function inside a VPC and routing through a NAT gateway—works, but it drags in cold-start latency, per-GB NAT egress costs, and a hard dependency on a single cloud’s networking model.

Zero trust for serverless means giving every function an identity, a policy, and a private path to the resources it is allowed to reach—without exposing a public IP and without assuming the function is a trusted insider. This post walks through the four ways to connect Lambda and Cloud Functions to private resources (VPC attachment, VPC endpoints, private service connect, and a mesh), when each makes sense, and how a WireGuard mesh with ABAC policy solves the identity and reachability problem that the cloud-native options leave open.

QuestionQuick Answer
What is the core issue?Serverless functions are internet-only by default and cannot reach private subnets without explicit wiring.
Why is VPC attachment flawed?It incurs ENI cold-start delays, charges per-GB NAT egress fees, and relies on subnet-based “trust by location”.
What is the Zero Trust approach?Give each function an ephemeral workload identity, evaluate per-connection ABAC rules, and tunnel via WireGuard.
How does it handle multi-cloud?A unified mesh connects AWS Lambda, GCP Cloud Functions, and on-prem servers to shared private databases seamlessly.
How does QuickZTNA help?QuickZTNA delivers WireGuard mesh networking, cryptographic workload identities, ABAC enforcement, and SIEM-ready audit logs.

Who This Is For

  • Serverless Engineers who have hit the “my Lambda can’t reach the database” wall.
  • Platform and DevOps Teams running event-driven workloads that need to touch private state.
  • Security Architects who are tired of explaining that a function with a public endpoint is not zero trust just because it has an IAM role.
  • If you run AWS Lambda, Google Cloud Functions, or Cloud Run and need those functions to reach a private Postgres, an internal API, or an on-prem service, this is the map.

Key Takeaways

  • A serverless function is internet-only by default: It cannot reach your VPC, your private database, or your on-prem network without explicit wiring.
  • The classic fix costs latency and money: VPC attachment plus a NAT gateway works but costs you cold-start latency and per-GB egress fees, and it locks you into one cloud’s networking model.
  • VPC endpoints and Private Service Connect are limited: They give you a private path without a NAT gateway, but they only cover a short list of managed services.
  • The real gap is identity and policy: A function inside a VPC is still “trusted by location,” not “trusted by identity.” That is not zero trust.
  • A WireGuard mesh treats the function as an untrusted peer: It assigns an identity and an ABAC policy—it can reach exactly the private resources its policy allows, per connection, with no public IP.
  • Solves cold starts, NAT bills, and multi-cloud: Cold start, NAT cost, and multi-cloud reachability are the three problems a mesh solves that VPC attachment does not.
  • QuickZTNA reference implementation: QuickZTNA provides the mesh, ABAC, JIT, device posture, and audit layer—free for up to 5 users, forever.

1. Problem Statement: The Function That Can’t Reach the Database

Every serverless team hits the same wall eventually. You write a Lambda that needs to read from a Postgres instance sitting in a private subnet. You deploy it. It times out. You check the logs and find the connection refused. The function has an IAM role with full database permissions, the security group allows the traffic, and yet nothing connects.

The reason is not a permissions bug. It is a networking fact: by default, a serverless function runs in a managed execution environment that has no route into your VPC. It can reach the public internet, but your private database is not on the public internet. The function is, in the truest sense, an island.

The moment you try to fix it, you discover the second problem. To give the function a private path, you attach it to a VPC. Now it needs a NAT gateway to reach anything at all—including the public APIs it used to call for free. The NAT gateway adds cold-start latency and a per-GB egress charge. Your “serverless, pay only for what you use” function now has a monthly NAT bill that does not scale down to zero.

And even after you solve reachability, the third problem remains: identity. A function inside your VPC is trusted because of where it sits, not because of who it is. Any compromised dependency running in that function can reach anything the subnet can reach. That is the opposite of zero trust.

This is the gap this post is about. Serverless is the fastest-growing compute model in the industry, and it is also the place where the “trusted network location” model is most obviously wrong. The fix is not a bigger NAT gateway. It is treating the function as an untrusted peer with an identity, a policy, and a private path.

Mesh Topology: Serverless Zero Trust Mesh: Ephemeral Lambda to Dark Aurora Figure 1.1: Distributed Mesh Topology & Multi-Cloud Peering Matrix — Serverless Zero Trust Mesh: Ephemeral Lambda to Dark Aurora.

Distributed Mesh Topology & Multi-Cloud Peering Matrix

The network topology above maps the peer-to-peer overlay and encrypted data plane for Serverless Zero Trust Mesh: Ephemeral Lambda to Dark Aurora:

  • Coordination Layer (QuickZTNA In-Memory Serverless Policy Broker): Provides sub-50ms ephemeral identity attestation for serverless compute runtimes without VPC routing table locks
  • Distributed Mesh Nodes:
    • AWS Serverless (us-east-1) (AWS Lambda Runtime): 100.64.50.1 (ztna0). Ephemeral Micro-WireGuard Connector; Sub-50ms Cold Start / Zero VPC ENI.
    • Private Database VPC (Amazon RDS Aurora Postgres): 100.64.50.10 (ztna0). 100% Dark in Private Subnet; 0.0.0.0/0 INGRESS: DROP ALL.
    • GCP Cloud Functions (GCP Cloud Run Service): 100.64.50.20 (ztna0). Cross-Cloud Microservice Mesh; Zero Public IP / Zero NAT Gateway.
    • DevOps Monitoring (Datadog / SIEM Collector): 100.64.50.30 (ztna0). Cryptographic Event Auditing; Per-Invocation Invocation Telemetry.
  • Direct Point-to-Point Transit: Endpoints negotiate direct UDP sockets via STUN/DERP hole-punching, entirely bypassing centralized VPN concentrator bottlenecks.

2. A Short History of Serverless Networking

  • Phase 1: The public-only function (2014–2017): When AWS Lambda launched in 2014, functions were strictly internet-only. They could call public APIs and AWS services over the public endpoint, but there was no way to reach a VPC resource. Teams worked around it by exposing internal services through public endpoints with API keys—a security anti-pattern that still haunts many codebases.
  • Phase 2: VPC attachment (2017–2020): AWS added VPC support to Lambda in 2017. You could finally attach a function to a VPC and reach private resources. But the implementation was blunt: the function lost internet access unless you added a NAT gateway, and every invocation paid the cold-start and egress cost. Google Cloud Functions and Cloud Run followed with similar models.
  • Phase 3: Private endpoints (2020–2023): VPC endpoints (AWS PrivateLink) and Private Service Connect (GCP) gave functions a private path to managed services without a NAT gateway. This removed the egress cost for a short list of services—S3, DynamoDB, RDS, and a few others—but it did not solve the general problem of reaching arbitrary private resources, and it did not add identity-based policy.
  • Phase 4: Zero trust for serverless (2023–present): The industry started treating functions as untrusted peers. Workload identity federation gave functions short-lived, scoped credentials. Mesh-based ZTNA gave functions identity-scoped network access to private resources. The lesson of the history is the same as everywhere else in zero trust: location is not trust, and the only durable model is to assume the function is compromised and design the network so a compromise is contained.

3. Definition: Serverless Zero Trust

Serverless zero trust is the application of the NIST SP 800-207 zero-trust model to function-as-a-service workloads. It treats every serverless function as an untrusted resource that must authenticate with an identity, be authorized per connection against a policy, and be continuously verified—rather than as a trusted insider with standing network access.

The three core principles, mapped to serverless:

Zero-Trust PrincipleServerless Application
Never trust, always verifyEvery function authenticates with a workload identity; every connection to a private resource is evaluated against policy.
Least privilegeThe function can reach exactly the resources its policy allows—not the whole subnet, not the whole VPC.
Assume breachThe function is assumed compromised; the network and credentials are designed so a compromise is contained to one resource.

A serverless zero-trust layer is not a single tool. It is a set of controls working together: workload identity for credentials, a private path for reachability, ABAC for policy, and audit for evidence.


4. Architecture: The Four Ways to Reach Private Resources

There are four ways to connect a serverless function to a private resource. Each solves reachability differently, and each leaves a different gap.

+-------------------------------------------------------------------------+
|                  1. VPC Attachment + NAT Gateway                        |
|  [Lambda] -> (ENI) -> [VPC Subnet] -> [NAT Gateway] -> [Internet/DB]    |
|  Drawback: High cold start (1-3s), per-GB NAT egress, location trust.   |
+-------------------------------------------------------------------------+
| ❌ 2. VPC Endpoints (AWS PrivateLink) |
| ❌ [Lambda] -> [PrivateLink Interface] -> [Managed AWS Service Only] |
| ❌ Drawback: Limited to supported cloud services; no custom servers. |
+-------------------------------------------------------------------------+
|                  3. Private Service Connect (GCP)                       |
|  [Cloud Run] -> [PSC Forwarding Rule] -> [Managed GCP Service Only]     |
|  Drawback: GCP-only; cannot reach on-prem or arbitrary legacy apps.     |
+-------------------------------------------------------------------------+
| ❌ 4. Encrypted WireGuard Mesh + ABAC |
| ❌ [Function] -> (Workload Identity) -> [WireGuard Tunnel] -> [Node/DB] |
| ❌ Benefit: Least-privilege ABAC, no NAT bill, multi-cloud, zero public IP |
+-------------------------------------------------------------------------+

1. VPC Attachment + NAT Gateway

The function is attached to a VPC and placed in a private subnet. A NAT gateway in a public subnet provides outbound internet. The function can reach anything in the VPC and, through the NAT, the public internet.

  • Pros: Works for any resource in the VPC. Native to the cloud.
  • Cons: Cold-start latency from ENI attachment. Per-GB NAT egress cost. The function is trusted by location, not identity. Single-cloud lock-in.

The function stays in the managed environment but reaches a managed service through a VPC endpoint. No NAT gateway, no public IP, no egress cost for the covered services.

  • Pros: No NAT cost. Private path. Low latency.
  • Cons: Only covers a short list of managed services. Does not reach arbitrary private resources or on-prem. No identity-based policy beyond IAM.

3. Private Service Connect (GCP)

The GCP equivalent of PrivateLink. Functions and Cloud Run reach managed services through a private connection.

  • Pros: Private path, no public IP.
  • Cons: Same limits as PrivateLink—managed services only, no general private reachability.

4. A WireGuard Mesh

The function runs a lightweight mesh client (or connects through a mesh gateway) and joins a tailnet. It gets a private IP and an identity. ABAC policy decides what it can reach, per connection.

  • Pros: Reaches any private resource—VPC, on-prem, multi-cloud. Identity-based policy. No public IP. No NAT egress cost. Works across clouds.
  • Cons: Requires a mesh client or gateway in the path. Adds a small per-connection overhead.

Why Reachability Alone Is Not Enough

It is worth being precise about why the first three options leave a gap. Reachability answers the question “can the function get a packet to the resource?” Identity answers the question “should this specific function be allowed to?” The cloud-native options are almost entirely about the first question.

  • VPC attachment answers reachability by putting the function inside the network. It does not answer identity—the function is trusted because of its subnet.
  • VPC endpoints answer reachability for a specific managed service. They do not answer identity beyond the IAM role that governs invocation.
  • Private Service Connect is the same story on GCP.
  • A mesh answers both. The function gets a private path (reachability) and an identity with a policy (authorization). That is the difference between “the function can reach the database” and “this function, and only this function, can reach the primary database on port 5432, right now.”

5. Internal Working: Identity, Policy, and the Data Plane

A mesh-based serverless zero-trust layer has three moving parts:

  1. Identity: Every function gets a workload identity—a cryptographic key pair bound to the function, not to a shared service account. When the function starts, it authenticates to the control plane and receives a short-lived credential. This is the “who” of the connection.
  2. Policy: ABAC rules decide what the identity can reach. The rules are keyed on attributes: the function’s identity, the target resource, the protocol, the port, the time of day. A rule might say “the order-processor function can reach db-primary on port 5432, but not db-analytics.” The policy is evaluated per connection, not once at deploy time.
  3. Data Plane: Traffic flows over a WireGuard tunnel. WireGuard uses X25519 key exchange and ChaCha20-Poly1305 AEAD encryption. The function’s traffic to the private resource is encrypted end-to-end, and the resource never sees a public IP—it sees the function’s mesh address.

How Identity Is Issued and Rotated

The workload identity is not a static key you paste into the function. It is issued through a federation flow. The function presents a token from the cloud’s identity system (an OIDC token from AWS or GCP), and the control plane exchanges it for a short-lived mesh credential. That credential is bound to the function’s identity and expires on a schedule—minutes, not months.

This matters for two reasons:

  1. A leaked credential is useless after it expires.
  2. You can revoke a function’s access instantly by revoking its identity, without touching the network. In a VPC model, revoking access means editing security groups and waiting for propagation. In a mesh model, it is a policy change that takes effect on the next connection.

Per-Connection ABAC Evaluation

The ABAC engine does not evaluate policy once at deploy time. It evaluates it on every connection attempt. The attributes it considers include the function’s identity, the target resource, the protocol, the port, and the time of day. A rule can be as narrow as: the order-processor function can reach db-primary on TCP 5432 between 06:00 and 22:00 UTC

Because evaluation is per connection, a policy change is immediate. Denying access to db-analytics halts the next socket attempt instantly.


6. Components of a Serverless Zero-Trust Layer

ComponentRoleExample
Workload identityGives the function a cryptographic identityFunction key pair, OIDC federation
Control planeIssues credentials, evaluates policy, logs decisionsQuickZTNA control plane
Mesh client / gatewayCarries the function’s traffic over the tunnelWireGuard client in the function or a gateway
ABAC policy engineDecides what the identity can reach, per connectionRules keyed on identity, target, protocol, port
Private resource connectorExposes the private resource to the meshA mesh node on the database host or a gateway in the VPC
Audit logRecords every policy decision and connectionReal-time JSON stream exportable to SIEM

7. End-to-End Workflow: From Event to Audited Private Call

  1. An event triggers the function—an S3 upload, a Pub/Sub message, an HTTP request.
  2. The function starts and authenticates to the control plane with its workload identity. It receives a short-lived credential.
  3. The function needs to read from the private database. It resolves the database’s mesh address (e.g. db-primary.acme.zt.net).
  4. The ABAC policy engine evaluates the connection: is this identity allowed to reach this resource on this port, now?
  5. If allowed, the function’s traffic flows over the WireGuard tunnel to the database’s mesh node. The database sees the function’s mesh address, not a public IP.
  6. The connection is logged: who, what, when, allowed or denied.
  7. The function completes, the credential expires, and the connection closes.

[!NOTE] Serverless Zero-Trust Invocation Sequence:

  1. Event Trigger: Client / EventBridge triggers serverless function.
  2. OIDC Workload Auth: Function issues ephemeral JWT token via Workload Identity.
  3. WireGuard Micro-Tunnel: Kernel extension establishes authenticated tunnel to target backend.
  4. Resource Access: Scoped SQL / internal API request executed; zero lateral network exposure.

The Cold-Start Reality: In-Process Client vs. Gateway Pattern

  • In-process client: The mesh client runs inside the function’s runtime. It adds a small, fixed initialization cost—typically tens of milliseconds—on top of the function’s own cold start. This is the simplest pattern and the best for a single function.
  • Gateway pattern: The function does not run a client at all. It calls a mesh gateway that sits in front of the private resource. The gateway carries the traffic over the tunnel. This adds a minimal network hop but keeps the function runtime clean and avoids any client overhead.

8. Configuration: Real ABAC and Mesh Examples

Here is what a mesh-based serverless connection looks like in practice.

Step 1: Register the Private Resource

The database host joins the mesh as a node, or a gateway in the VPC advertises the database’s subnet:

# On the database host (or a gateway in the VPC)
ztna up --advertise-routes=10.0.4.0/24

Step 2: Give the Function an Identity

The function authenticates with an ephemeral workload identity:

# In the function's container bootstrap or wrapper
ZTNA_AUTH_KEY=tskey-auth-xxx
curl -fsSL https://login.quickztna.com/install.sh | ZTNA_AUTH_KEY=$ZTNA_AUTH_KEY sh

Step 3: Define the ABAC Policy

Explicitly allow order-processor to reach primary Postgres, but deny analytics:

# QuickZTNA ABAC Policy Definition
policies:
  - name: serverless-order-processing
    rules:
      - action: allow
        src: "tag:order-processor"
        dst: "db-primary.acme.zt.net:5432"
        proto: tcp
      - action: deny
        src: "tag:order-processor"
        dst: "db-analytics.acme.zt.net:5432"
        proto: tcp

Step 4: Call the Private Resource in Code

The function connects to the database’s mesh address as if it were local:

import psycopg2

# Connect using the mesh DNS hostname
conn = psycopg2.connect(
    host="db-primary.acme.zt.net",
    port=5432,
    dbname="orders",
    user="order_svc",
    password="secure_password"
)

The Gateway Pattern Configuration

If using a gateway rather than an in-process client:

# 1. The gateway in the VPC advertises the database subnet
ztna up --advertise-routes=10.0.4.0/24

# 2. The function calls the gateway's mesh hostname
conn = psycopg2.connect(
    host="db-gateway.acme.zt.net",
    port=5432,
    dbname="orders"
)

9. Engineering Scenarios

  • Example 1 — A Lambda reading from a private Postgres: An e-commerce team has a Lambda that processes order events and writes to a Postgres in a private subnet. With VPC attachment, every invocation pays NAT egress and cold-start latency. With a mesh, the Lambda joins the tailnet, the Postgres host is a mesh node, and the ABAC policy allows the order-processor function to reach db-primary:5432. No NAT gateway, no public IP, no egress cost.
  • Example 2 — A Cloud Function calling an on-prem service: A healthcare team has a Cloud Function that needs to call an on-prem billing service. VPC attachment cannot reach on-prem without a VPN or a dedicated connection. A mesh bridges the gap: the on-prem service joins the tailnet, and the Cloud Function reaches it over the encrypted tunnel. The on-prem service never exposes a public IP.
  • Example 3 — A multi-cloud event pipeline: A fintech team runs functions on both AWS and GCP that need to share a private analytics store. VPC attachment locks them into one cloud. A mesh spans both: the analytics store is a mesh node, and functions on either cloud reach it through the same tailnet with the same ABAC policy.
  • Example 4 — A function that needs both private and public access: A function must reach a private database and a public third-party API (e.g., Stripe). With VPC attachment, the function is in a private subnet, needing a NAT gateway just to reach the public API. With a mesh, the function reaches the private database over the tunnel and the public API over its normal default internet path—no NAT gateway required.

10. Performance: Cold Start, NAT Cost, and Mesh Overhead

  • Cold Start: VPC attachment adds ENI setup time to cold starts—often 1–3 seconds. A mesh client adds tens of milliseconds, and does not require VPC attachment.
  • NAT Egress Cost: A NAT gateway charges per GB of data processed. A mesh routes traffic over the tunnel without a NAT gateway, eliminating that charge entirely.
  • Per-Connection Overhead: WireGuard adds negligible per-packet overhead (microseconds) for ChaCha20-Poly1305 encryption.

Cost Analysis

Consider a function with 10 million invocations/month, each transferring 50 KB to a private database.

  • Data Volume: 500 GB / month
  • NAT Egress Rate: ~$0.045 / GB + ~$32/month NAT gateway hourly baseline fee.
  • Monthly Cost with NAT: ~$54.50 / month per function.
  • Monthly Cost with Mesh: $0 (routes peer-to-peer over WireGuard tunnel with zero per-GB gateway fees).

11. Security Threat Model & Attack Blast Radius

[!NOTE] • VPCAttached Model (Location Trust): • [Compromised Lambda] ► Subnet Scan ► Access to ANY subnet host • Blast Radius: ENTIRE SUBNET / VPC • Mesh ABAC Model (Zero Trust): • [Compromised Lambda] ► Blocked by ABAC ► Only reached DB port 5432 • Blast Radius: BOUNDED STRICTLY TO AUTHORIZED TARGET PORT

The most realistic serverless compromise is a malicious dependency (e.g. from npm or PyPI). In a VPC-attached model, the compromised package inherits the Lambda’s network placement and can pivot to any subnet resource. In a Zero Trust mesh model, the attacker inherits only the function’s narrow ABAC policy (e.g. TCP port 5432 on a single DB host). Lateral movement across the VPC is blocked.


12. Troubleshooting Common Serverless Connectivity Issues

  • Function times out connecting to database: Check that the function has authenticated to the mesh and that the database host is an active mesh node. Verify the ABAC policy allows the connection on that specific port.
  • Function reaches mesh but not the resource: Confirm whether subnet routes are being advertised correctly (--advertise-routes) or if local host firewalls on the database are dropping the packet.
  • Cold starts are slow: If still using VPC attachment, remove the function from the VPC and use the in-process mesh client or external gateway pattern.
  • NAT bill is unexpectedly high: Audit Lambda configurations to ensure they are routing private calls over the mesh rather than default VPC NAT gateways.
  • Function works locally but fails in production: Local testing often uses developer workstation mesh credentials. Verify that the production CI/CD pipeline deploys the correct workload identity credentials.

13. Best Practices & Common Mistakes

Best Practices

  1. Give every function a workload identity: Never share a single service account across multiple lambdas.
  2. Scope policy to the resource, not the subnet: Target db-primary:5432, never 10.0.0.0/16.
  3. Use short-lived credentials: Authenticate via OIDC tokens that expire automatically.
  4. Log every policy decision: Stream allowed and denied events to your SIEM for compliance.
  5. Assume the function is compromised: Restrict network reachability to contain dependency supply-chain exploits.
  6. Remove the public-IP attack surface: Keep internal databases dark to public internet scans.

Common Mistakes

  • Trusting the function because it has an IAM role: IAM governs cloud API execution, not Layer 4 network authorization.
  • Opening the whole subnet to “make it work”: Recreates flat network vulnerabilities.
  • Ignoring the NAT bill: Paying hourly and data-transfer fees for traffic that could stay on a mesh.
  • Using a public endpoint with an API key: Exposes database endpoints to public internet scans and brute-force attacks.
  • Forgetting audit logs: Failing to maintain forensic records of serverless network requests.

14. Comparison Tables

Serverless Private-Access Options

OptionReaches Arbitrary Private ResourcesIdentity-Based PolicyNo NAT CostMulti-CloudOn-Prem
VPC Attachment + NAT✅ Yes❌ No❌ No❌ No❌ No
VPC Endpoints (PrivateLink)❌ No (Managed services only)⚠️ Partial✅ Yes❌ No❌ No
Private Service Connect (GCP)❌ No (Managed services only)⚠️ Partial✅ Yes❌ No❌ No
WireGuard Mesh + ABACYesYesYesYesYes

Zero-Trust Layer vs. VPC Attachment

AttributeVPC AttachmentMesh + ABAC (QuickZTNA)
Trust Model❌ By location (subnet)✅ By cryptographic identity
Cold-Start Impact❌ 1–3s ENI attachment latency✅ Minimal / sub-50ms
NAT Egress Cost❌ Yes (per-GB + hourly)✅ None ($0)
Public IP on Resource❌ No✅ No
Multi-Cloud Support❌ No (single VPC locked)✅ Yes (AWS, GCP, Azure, on-prem)
Blast Radius on Compromise❌ The entire subnet✅ Strictly the policy rule

15. Enterprise & Cloud Deployment Architectures

For enterprise organizations running thousands of serverless invocations per second across multi-cloud environments:

  1. Standardize on Workload Identity: Federated via Okta, Azure AD, or Google Cloud IAM using OIDC tokens.
  2. Centralize ABAC Policies: Store access rules as code in Git, versioned and applied dynamically across the tailnet.
  3. Connect the Private Estate: Deploy stateless QuickZTNA gateways across AWS, GCP, and on-premises data centers.
  4. Enforce Least Privilege: Restrict each function’s access to exact destination hostnames and ports.
  5. Stream Audit Logs: Ship structured JSON network records directly to Splunk, Datadog, or Elastic for SOC 2 Type II and ISO 27001 compliance.

Summary & Next Steps

Serverless architecture requires a modern security model where network location is decoupled from trust. By implementing a WireGuard mesh with ABAC policy, you eliminate cold-start delays, cut out NAT gateway egress fees, and ensure compromised functions cannot move laterally across private networks.

QuickZTNA provides the zero-trust mesh, ABAC policy engine, and audit logging required to connect serverless workloads to private infrastructure securely. Free for up to 5 users, forever.

Frequently asked questions

Why can't my Lambda reach my private database by default?
Because serverless functions run in a managed execution environment that has no route into your VPC. They can reach the public internet, but your private database is not on the public internet—it lives behind a private subnet with no public endpoint. To give the function a private path, you have to explicitly wire it into a private network, either by attaching it to a VPC or by connecting it through a mesh. Without that wiring, the connection times out no matter how broad the IAM role is.
What is the difference between VPC attachment and a mesh?
VPC attachment puts the function inside your VPC and trusts it by location—anything in the subnet is reachable, which is not zero trust. A mesh gives the function an identity and an ABAC policy, and trusts it by identity, so it can reach only the specific resources its policy allows. A mesh also avoids the NAT egress cost that VPC attachment requires, and it works across clouds and on-prem, where VPC attachment is locked to a single cloud's networking model.
Does a mesh add cold-start latency?
Less than VPC attachment. VPC attachment adds ENI setup time to every cold start—often 1–3 seconds on top of the function's own initialization. A mesh client adds a smaller, more predictable overhead, typically tens of milliseconds, and it does not require the function to be attached to a VPC at all. If you use the gateway pattern, the function runs no client at all and the overhead is just a single network hop to the gateway.
Can I reach on-prem services from a serverless function?
Yes, with a mesh. VPC attachment cannot reach on-prem without a VPN or a dedicated connection, which is a heavy lift. A mesh bridges the gap: the on-prem service joins the tailnet as a node, and the function reaches it over the encrypted tunnel. The on-prem service never exposes a public IP, and the connection is governed by the same ABAC policy as any other private resource.
Is a function with an IAM role zero trust?
No. IAM controls who can invoke the function; it does not control what the function can reach on the network. A function with a broad IAM role and standing network access is trusted by location, not by identity. Zero trust requires that the function authenticate with a workload identity and be authorized per connection against a policy—not just that it has permission to run.
How do I keep a compromised function contained?
Scope the ABAC policy to the resource, not the subnet. A compromised function can reach only what its policy allows, so the blast radius is the policy, not the whole VPC. If the function only needs db-primary:5432, a compromised dependency in that function can reach only that resource. This is the core difference from VPC attachment, where a compromised function inherits the entire subnet's reachability.
Does QuickZTNA connect serverless functions to private resources?
QuickZTNA provides the mesh, ABAC, JIT, device posture, and audit layer that gives a serverless function an identity and a private path to the resources its policy allows. The function joins the tailnet, the private resource is a mesh node or behind a gateway, and the ABAC policy governs every connection. It is free for up to 5 users, forever, with no credit card and no trial expiry.
QuickZTNA Engineering Cloud & Infrastructure Architecture