Back to Cloudflare

Connect Cloudflare to AWS, Azure, and Private Services

November 5, 2026 Wasil Zafar 24 min read

Keep delivery, private connectivity, and cloud ownership explicit

Table of Contents

  1. Public Origins and Private Service Bindings Are Different Paths
  2. Workers VPC Services and Networks
  3. AWS and Azure Origin Authentication and Connectivity
  4. IaC Ownership, Residency, and Failure Boundaries
  5. Design a Worker Calling a Private Cloud API
  6. Enumerate Reachability, Authorization, and Failure Tests

Public Origins and Private Service Bindings Are Different Paths

A checkout Worker needs a ledger in an AWS VPC and a customer profile in an Azure VNet. Neither has a public hostname, and neither should.

A public origin is a shopfront on a main road: anyone can approach, so the shop needs its own lock and doorman. A private binding is a service hatch inside a controlled building: the courier needs no street address, but the hatch still checks the parcel label and recipient.

An origin owns the response. A proxied hostname sends traffic through Cloudflare's edge before that origin. A private network is an address space not routable from the Internet, such as an AWS VPC or Azure VNet. A Cloudflare Tunnel is an outbound-only connection from a host inside that network to Cloudflare, so no inbound firewall hole is needed.

Workers VPC builds on the tunnel. A VPC Service catalogs one target: type, tunnel, host or IP, ports, TLS settings. A VPC Network grants access to anything reachable through a tunnel, Mesh network, or virtual network, with the URL choosing the destination at runtime. A binding is the Worker's handle to either. It is a capability, not a general socket: env.PRIVATE_API.fetch(...) reaches only what the configuration allows.

On the public path, DNS points at Cloudflare, the edge terminates client TLS, and Cloudflare connects over the Internet. The origin must prove the request came through Cloudflare using Authenticated Origin Pulls, mutual TLS, or a narrow IP allowlist. On the private path, the Worker calls a binding, Cloudflare routes through the tunnel, and cloudflared reaches a private address. No public DNS record is needed.

Figure 1 shows both paths and where they break.

Public Origins and Private Service Bindings Are Different Paths
%%{init: {'theme':'base','themeCSS':'.edgeLabel .label text, .edgeLabel text, .edgeLabel span { fill:#132440 !important; color:#132440 !important; }','themeVariables': {'primaryColor':'#16476A','primaryTextColor':'#ffffff','primaryBorderColor':'#132440','secondaryColor':'#3B9797','secondaryTextColor':'#ffffff','secondaryBorderColor':'#132440','tertiaryColor':'#c4873b','tertiaryTextColor':'#132440','tertiaryBorderColor':'#132440','lineColor':'#5a6e82','textColor':'#132440','titleColor':'#132440','mainBkg':'#16476A','nodeBorder':'#132440','clusterBkg':'#eef3f7','clusterBorder':'#132440','edgeLabelBackground':'#ffffff','actorBkg':'#16476A','actorTextColor':'#ffffff','actorBorder':'#132440','activationBkgColor':'#3B9797','activationBorderColor':'#132440','signalColor':'#5a6e82','signalTextColor':'#132440','noteBkgColor':'#c4873b','noteTextColor':'#132440','noteBorderColor':'#132440','labelBoxBkgColor':'#a8dede','labelBoxBorderColor':'#132440','labelTextColor':'#132440','loopTextColor':'#132440','altBackground':'#f8f9fa','fontFamily':'DM Sans, sans-serif'}}}%%
flowchart TD
    C[Browser or API client] --> E[Cloudflare edge]
    E -->|proxied hostname| PUB[Public origin]
    PUB -->|public Internet + TLS| AWS1[AWS or Azure public endpoint]
    E -->|invokes Worker| W[Worker code]
    W -->|binding fetch| S[VPC Service or Network]
    S --> T[Cloudflare Tunnel]
    T -->|private IP or DNS| PRIV[Private origin]
    PUB -.->|missing allowlist or mTLS| BYPASS[Direct bypass path]
    T -.->|tunnel down, QUIC blocked, DNS failure| ERR[fetch throws]
    classDef primary fill:#132440,color:#ffffff,stroke:#0b172b;
    classDef secondary fill:#16476A,color:#ffffff,stroke:#0f314a;
    classDef ok fill:#3B9797,color:#ffffff,stroke:#2a6f6f;
    classDef danger fill:#BF092F,color:#ffffff,stroke:#7a0420;
    classDef warn fill:#c4873b,color:#132440,stroke:#8a5a1f;
    class E,PUB,T,PRIV primary;
    class C,AWS1,W,S,ERR secondary;
    class BYPASS danger;

Figure 2 layers the relationship by trust boundary. The important line is not "inside versus outside Cloudflare"; it is who can name the destination and who can prove the caller's identity. A VPC Service fixes the destination, which resists server-side request forgery. Authorization belongs at the origin, because the tunnel carries no end-user or cloud-provider identity.

Public and private origin paths A client reaches Cloudflare's edge. The public path continues over the Internet to a public origin. The private path goes from a Worker through a VPC Service and Cloudflare Tunnel to a private origin. LAYER PUBLIC PATH PRIVATE PATH Client and edge Proxied DNS; edge TLS Worker plus binding Transport Internet and allowlist VPC Service plus tunnel Provider Public origin Private origin

Use a public origin when the service serves the open web and can enforce its own edge trust. Use a private binding when it should never be nameable from the Internet. Do not use a private binding merely to avoid TLS or authentication; it solves reachability, not identity.

Workers VPC Services and Networks

Check the plan, role, and cap before designing around it.

The boundary is narrower than "Cloudflare joins my VPC." For the VPC Service path, Cloudflare does not peer with AWS or Azure or create a route-table entry. It routes a Worker request to a cloudflared connection you run, and that daemon uses the network's own routing, security groups, and DNS. You still own the VPC, VNet, tunnel host, and provider firewall rules.

CriterionVPC ServiceVPC Network
Routing scopeOne pre-registered host and portAnything reachable through the bound tunnel, Mesh network, or virtual network
Configuration handleservice_idtunnel_id, network_id: "cf1:network", or cf1:vnet:<UUID>
Runtime destinationFixed by configuration; URL host is not a routeChosen by the fetch() URL or connect() address
ProtocolsHTTP and HTTPS via fetch(); TCP for databases through HyperdriveHTTP via fetch(); plaintext TCP via connect()
Registration costOne entry per targetNone per target
DNS behaviourHostname with optional resolver IPs, or a literal IPResolves through the bound network's routes and DNS
Blast radiusNarrow: only that targetBroad: anything the binding permits
Best fitFixed payment, identity, or admin APIs; cataloged databasesShared platform networks, many services, overlapping prod and staging addresses

A payments API at 10.0.1.50:8080 is a good VPC Service: one target, one Worker, a small blast radius. A platform VPC with forty services, blue-green hosts, and a staging network that also uses 10.0.1.50 is a better VPC Network: bind production and staging virtual networks separately and let the URL choose the host. The first minimizes exposure; the second avoids a hundred entries and an update for every backend.

Routing follows the registration, not the URL. Two parts of the request look like routing controls and are not, and the TLS modes trade verification for compatibility.

SettingWhat it controlsPractical consequence
URL host in fetch()Host header and, for HTTPS, SNINever selects the private destination
URL portNothingIgnored; the registered port is used
verify_full (default)Certificate chain and hostnameTrusts public CAs and Cloudflare Origin CA only
verify_caChain, but not hostnameTolerates a name mismatch; weaker than full
disabledNo certificate checksReachability without authentication; diagnostics only
--app-protocol on a TCP servicepostgresql or mysql metadataWhat Hyperdrive reads to speak the database protocol

A service registered at 10.0.1.50:8080 answers every request at that address, even when the Worker asks for https://anything.example/health; the URL host only sets Host and SNI. That is excellent SSRF resistance and a poor fit for runtime routing.

Private CA certificates are not trusted and custom CA upload is unsupported at the verification date. Treat disabled as a temporary diagnostic, never as a production setting.

Figure 3 follows a request through those pieces and shows three failure families: tunnel unavailable, DNS or TLS failure, and origin rejection. The error code tells you which team owns the fix.

Workers VPC Services and Networks
%%{init: {'theme':'base','themeCSS':'.edgeLabel .label text, .edgeLabel text, .edgeLabel span { fill:#132440 !important; color:#132440 !important; }','themeVariables': {'primaryColor':'#16476A','primaryTextColor':'#ffffff','primaryBorderColor':'#132440','secondaryColor':'#3B9797','secondaryTextColor':'#ffffff','secondaryBorderColor':'#132440','tertiaryColor':'#c4873b','tertiaryTextColor':'#132440','tertiaryBorderColor':'#132440','lineColor':'#5a6e82','textColor':'#132440','mainBkg':'#16476A','nodeBorder':'#132440','clusterBkg':'#eef3f7','clusterBorder':'#132440','edgeLabelBackground':'#ffffff','actorBkg':'#16476A','actorTextColor':'#ffffff','actorBorder':'#132440','activationBkgColor':'#3B9797','activationBorderColor':'#132440','signalColor':'#5a6e82','signalTextColor':'#132440','noteBkgColor':'#c4873b','noteTextColor':'#132440','noteBorderColor':'#132440','labelBoxBkgColor':'#a8dede','labelBoxBorderColor':'#132440','labelTextColor':'#132440','loopTextColor':'#132440','altBackground':'#f8f9fa','fontFamily':'DM Sans, sans-serif'}}}%%
sequenceDiagram
    participant W as Worker
    participant V as VPC Service
    participant T as cloudflared
    participant O as Private origin
    W->>V: fetch(absolute URL)
    V->>V: Resolve service_id to configured host and port
    V->>T: Route request through tunnel
    alt Tunnel healthy and DNS resolves
        T->>O: Connect to private host and port
        alt Origin accepts credential
            O-->>W: 200 response
        else Missing, expired, or wrong-audience credential
            O-->>W: 401 or 403 response
        end
    else Tunnel down or QUIC blocked
        T-->>W: fetch throws destination_unavailable or connection_timeout
    else Private DNS or certificate failure
        T-->>W: fetch throws dns_error or tls_certificate_error
    end

One route, one binding, one private origin. The TypeScript panel calls an absolute URL with a five-second timeout, so an outage becomes a clean 503 rather than a hung request; the Bash panel registers the service and deploys the Worker that already binds it.

The script fails fast if any required environment variable is missing, so a half-configured shell stops before it creates anything.

type VpcFetcher = {
  fetch(input: Request | string | URL, init?: RequestInit): Promise<Response>;
};

interface Env {
  PRIVATE_PAYMENTS_API: VpcFetcher;
  ORIGIN_TOKEN: string;
}

export default {
  async fetch(request: Request, env: Env): Promise<Response> {
    const incoming = new URL(request.url);

    if (incoming.pathname !== "/health") {
      return new Response("Not found", { status: 404 });
    }

    const target = new URL("http://payments.internal.example/health");
    const headers = new Headers({
      authorization: `Bearer ${env.ORIGIN_TOKEN}`,
      "x-request-id": crypto.randomUUID(),
    });

    try {
      const response = await env.PRIVATE_PAYMENTS_API.fetch(target, {
        method: "GET",
        headers,
        signal: AbortSignal.timeout(5_000),
      });

      return new Response(response.body, {
        status: response.status,
        headers: {
          "content-type":
            response.headers.get("content-type") ?? "application/json",
          "cache-control": "no-store",
        },
      });
    } catch (error) {
      console.error("private origin fetch failed", {
        message: error instanceof Error ? error.message : String(error),
      });
      return Response.json(
        { error: "private_origin_unavailable" },
        { status: 503 },
      );
    }
  },
} satisfies ExportedHandler<Env>;
{
  "vpc_services": [
    {
      "binding": "PRIVATE_PAYMENTS_API",
      "service_id": "<SERVICE_ID>",
      "remote": true
    }
  ]
}
set -euo pipefail

: "${CLOUDFLARE_ACCOUNT_ID:?set CLOUDFLARE_ACCOUNT_ID}"
: "${TUNNEL_ID:?set TUNNEL_ID}"
: "${PRIVATE_API_HOST:?set PRIVATE_API_HOST}"
: "${WORKER_URL:?set WORKER_URL}"
: "${ORIGIN_TOKEN:?set ORIGIN_TOKEN}"

npx wrangler vpc service create private-payments-api \
  --type http \
  --tunnel-id "$TUNNEL_ID" \
  --hostname "$PRIVATE_API_HOST" \
  --http-port 8080

printf '%s' "$ORIGIN_TOKEN" | npx wrangler secret put ORIGIN_TOKEN
npx wrangler deploy
curl -fsS "$WORKER_URL/health"

Private DNS stalls first deployments

A hostname-based service needs a resolver that answers inside the private network. Point the service at the tunnel resolver or at explicit resolver IPs; otherwise cloudflared uses its system resolver and the lookup fails.

The tunnel must run version 2025.7.0 or later with QUIC on outbound UDP 7844. A tunnel forced to HTTP/2 can still serve some Zero Trust traffic but blocks Workers VPC DNS resolution, which surfaces as a dns_error.

Tunnel and Workers VPC are not competitors. A Tunnel plus Access is the right shape when people or existing Hyperdrive configurations need a public hostname and an identity policy; Workers VPC is the right shape when a Worker needs a private API or database and you do not want a public hostname or an Access application. The same cloudflared can serve both.

AWS and Azure Origin Authentication and Connectivity

Split by ownership, or the runbook has no owner. Each side holds a different half of the same request.

LayerCloudflare ownsAWS or Azure owns
ConnectivityTunnel, VPC Service or Network, Worker bindingVPC or VNet, subnets, route tables
ReachabilityRouting from the Worker to the tunnelSecurity groups, NSGs, network ACLs, private endpoints
AuthorizationCarries the request; supplies no end-user identityIAM, SigV4 keys, Entra app registrations, app roles
NamingService catalog and binding namesPrivate DNS zones and records
Change controlCloudflare state and credentialsProvider state and credentials

Reachability comes first on AWS. The tunnel host must reach the origin port, so the security group or network ACL must allow it.

An endpoint condition is not caller identity. An S3 VPC endpoint can require the endpoint in a bucket policy through aws:sourceVpce, but that proves the network path, not which Worker called.

IAM authorization means SigV4. The Worker signs with AWS Signature Version 4, usually through aws4fetch, with the access key in Workers Secrets. AWS rejects signatures more than five minutes from its clock, so scope IAM to one execute-api resource and method and rotate on a schedule you can prove.

Azure mirrors the shape. A private endpoint plus a private DNS zone resolves the FQDN to the private IP, and the NSG must allow the tunnel host to reach it. Authentication is usually an Entra ID app registration using the OAuth 2.0 client credentials flow: the Worker requests a token for the API's application ID URI and presents it as a bearer token.

Validate, do not just present. The API must check issuer, audience, and app role, not merely token presence. The secret belongs in Workers Secrets. A Worker is not an Azure resource, so it gets no Azure managed identity; use an app registration with a secret, certificate, or federated credential you can rotate.

Two credentials, one Worker. The TypeScript panel signs the AWS call and fetches an Entra token for Azure; the other panels carry the bindings and the secrets each path needs.

import { AwsClient } from "aws4fetch";

// Env carries the secret names and the two VPC bindings in the JSON panel.

// AWS: Signature Version 4, scoped to one execute-api route.
export async function callLedger(env: Env, path: string) {
  const aws = new AwsClient({
    accessKeyId: env.AWS_ACCESS_KEY_ID,
    secretAccessKey: env.AWS_SECRET_ACCESS_KEY,
    region: env.AWS_REGION,
    service: "execute-api",
  });

  const signed = await aws.sign(`https://ledger.internal${path}`);

  return env.PRIVATE_LEDGER.fetch(signed, {
    signal: AbortSignal.timeout(5_000),
  });
}

// Azure: OAuth 2.0 client credentials, one app role on one API.
export async function callProfiles(env: Env, path: string) {
  const tokenResponse = await fetch(
    `https://login.microsoftonline.com/${env.AZURE_TENANT_ID}/oauth2/v2.0/token`,
    {
      method: "POST",
      headers: { "content-type": "application/x-www-form-urlencoded" },
      body: new URLSearchParams({
        client_id: env.AZURE_CLIENT_ID,
        client_secret: env.AZURE_CLIENT_SECRET,
        scope: `${env.AZURE_API_APP_ID_URI}/.default`,
        grant_type: "client_credentials",
      }),
    },
  );

  const { access_token } = await tokenResponse.json<{ access_token: string }>();

  return env.PRIVATE_PROFILES.fetch(`https://profiles.internal${path}`, {
    headers: { authorization: `Bearer ${access_token}` },
    signal: AbortSignal.timeout(5_000),
  });
}
{
  "vpc_services": [
    {
      "binding": "PRIVATE_LEDGER",
      "service_id": "<AWS_SERVICE_ID>",
      "remote": true
    },
    {
      "binding": "PRIVATE_PROFILES",
      "service_id": "<AZURE_SERVICE_ID>",
      "remote": true
    }
  ]
}
npx wrangler secret put AWS_ACCESS_KEY_ID
npx wrangler secret put AWS_SECRET_ACCESS_KEY
npx wrangler secret put AZURE_CLIENT_SECRET
npx wrangler deploy

A payments platform with its ledger in AWS and profile in Azure, called by one Worker, creates two tunnels, two VPC Services, and two bindings. The AWS credential is scoped to execute-api:Invoke on one route; the Azure app registration has one app role on one API. Rotating the Azure secret leaves AWS working; tightening the AWS security group fails only the ledger call. That separation is the point: one cloud's failure does not become a shared credential incident.

Latency has two independent legs: edge to tunnel, and tunnel to origin. A Worker in one region calling a tunnel in another pays both, and a request that fans out to AWS and Azure pays two tunnel paths. Measure each path separately, parallelize independent lookups, and keep chatty calls out of the request path. A private path can be secure and still be the slowest part of checkout.

Check negatives first. No Authorization header should return 401; a token for the wrong audience should return 401 or 403; only the correctly scoped credential should return 200. Run all three before exposing the Worker route.

The URL is not the route. A VPC Service does not send traffic to the public hostname in fetch(); it uses the configured private host and port, and the URL host only sets Host and SNI.

A Worker that appears to call a public API may be calling a private service, and an origin that logs only the Host header can look publicly reached. Log the binding, configured target, and credential subject together.

IaC Ownership, Residency, and Failure Boundaries

Infrastructure as code should mirror the ownership split. Cloudflare's Terraform provider manages a VPC Service with cloudflare_connectivity_directory_service (v5.13.0 or later) and attaches it to a Worker version with a vpc_service binding. The AWS or Azure stack manages the network, security groups, private endpoints, DNS zones, and IAM or Entra resources. Keep separate state files and credentials. One state that owns both the tunnel and the provider network gives a bad plan power over the route and the credential, and forces one pipeline to hold both clouds' secrets.

The contract between stacks should be data, not copied strings. Export the tunnel ID and private target from the network stack; read the service ID through a data source or remote-state output in the Cloudflare stack. Do not paste a service ID into three repositories. If you use Pulumi, verify that the provider version you pin exposes the connectivity-directory resource before promising parity with Terraform; the API is shared, but SDK coverage is versioned.

Residency needs the same honesty. The Workers VPC documentation describes routing, scoping, TLS, and limits; it does not promise that a Worker executes in the same jurisdiction as the origin. The tunnel anchors entry into your network, but the Worker runs on Cloudflare's edge, which may be elsewhere. If data cannot leave a jurisdiction, put the tunnel and origin there, restrict what the Worker can read, and verify the contractual commitment with both providers. Do not infer residency from a private origin.

Figure 4 contrasts a single-stack model with a split model, then maps four failures to their owning layer: a stale IP after cutover, a tightened security group, a rotated certificate, and a stopped tunnel.

IaC ownership and failure boundaries One stack owning both Cloudflare and the provider creates a wide blast radius. Separate stacks exchange IDs as data. Four failures map to the layer that owns them. Before: one state Cloudflare plus provider resources One credential, one apply Wide blast radius: a bad plan can remove route, tunnel, and credential After: split state Tunnel and service IDs as data Separate credentials and owners Narrow blast radius: rotate one cloud without rewriting the other Failure to owning layer Stale private IP connection_refused Provider or VPC Service config Security group change connection_timeout Provider network team Certificate rotation tls_certificate_error Origin or certificate owner Tunnel stopped destination_unavailable Cloudflare tunnel operator

A cutover can strand the route

A blue-green deploy that changes a private IP is invisible to a VPC Service until someone updates the configured host. A DNS-based service hides the change behind a TTL; a literal IP cannot.

After cutover, call through the binding and check the origin's log for the new instance, not just the Worker's 200. A stale route often returns connection_refused; stale DNS can return dns_error while the application is healthy.

Tunnel capacity is another boundary. Cloudflare recommends two cloudflared replicas on separate hosts per location, each with at least 4 GB RAM and 4 CPU cores, and warns against autoscaling because downscaling breaks existing connections. Replicas provide high availability, not load balancing; requests go to the nearest replica. A single tunnel treated as production turns a host reboot into an outage no retry logic can fix.

Beta is a planning cost

Workers VPC is beta at the planning baseline. Pin the Terraform provider and Wrangler version, record the compatibility date, and re-run reachability tests after upgrades.

Beta does not mean unusable; it means the API and pricing can change. Write that migration cost into the design, not the incident review.

Design a Worker Calling a Private Cloud API

Guided exercise

Design a Worker Calling a Private Cloud API

Status: design-only. This exercise was not executed against a hosted account, and no latency, throughput, or cost measurement is claimed.

What you need

  • A Workers-plan account, a zone you control, and a token with Connectivity Directory Admin plus Workers edit.
  • One AWS VPC or Azure VNet with a private /health API on a known host and port.
  • One small Linux VM that can reach the API, runs cloudflared 2025.7.0 or later, and can send UDP 7844 outbound.
  • A test zone and no production data. The API requires a bearer token; Workers VPC is free during the open beta, but the plan, VM, provider egress, and NAT gateway are not.

Minimal setup. One VM, one API, one remotely-managed tunnel, one HTTP VPC Service, one Worker, and one secret named ORIGIN_TOKEN.

  1. Start the API on 10.0.1.50:8080. Restrict its security group or NSG to the tunnel VM. Confirm 401 without a token and 200 with the test token.
  2. Install cloudflared, create a remotely-managed tunnel in the Workers VPC dashboard, and confirm QUIC rather than HTTP/2.
  3. Create the service with --type http --hostname <private-api-host> --http-port 8080 or the IP form, then record the service ID.
  4. Add a vpc_services binding named PRIVATE_PAYMENTS_API with that ID and remote: true. Set a compatibility date and commit.
  5. Deploy the TypeScript panel, set ORIGIN_TOKEN, and call /health through the Worker.
  6. Stop cloudflared.
  7. Remove the security-group rule, restore it, and confirm a timeout rather than a 401. A timeout means the path broke; a 401 means the credential broke.
  8. Cleanup: delete the Worker, service, tunnel, secret, any DNS record, and VM. Confirm in the dashboard that the service entry is gone.

Expected results

CheckExpected
/health through the binding200 with the origin's JSON and an origin log entry showing Host and token subject; no public DNS record exists
Stop cloudflaredA bounded 503 and destination_unavailable or connection_timeout
Remove the NSG ruleA timeout, not a 401: the path broke, not the credential
After cleanupThe service entry is gone from the dashboard

Cost dimensions. Workers requests and CPU, VM compute and storage, provider outbound transfer and NAT, and any private-endpoint hourly charge. Do not extrapolate the open-beta price past the beta.

Invalid tests. A status-only check cannot distinguish a private call from a public or cached response. A public hostname in fetch() without target verification cannot prove the private path. Production credentials are not a controlled exercise.

Enumerate Reachability, Authorization, and Failure Tests

Run these as a matrix and record evidence. A green Worker response is not enough; the origin log and VPC Service metrics must agree.

  1. Reachability. Call /health. Pass: 200 with expected body and an origin log entry. Fail: timeout, destination_unavailable, or a cache hit with no origin entry.
  2. Route pinning. Call with a different hostname in the URL. Pass: the configured target still receives it; the origin sees the URL host only as Host or SNI. Fail: a different service responds.
  3. Missing credential. Call without Authorization. Pass: 401. Fail: 200 or a 503 that hides an authorization bug.
  4. Wrong audience or role. Use a valid token for the wrong API or role. Pass: 401 or 403 with a logged reason. Fail: 200, meaning scope is unchecked.
  5. Tunnel outage. Stop cloudflared. Pass: bounded 503 and a bad-upstream metric. Fail: a hang or silent public fallback.
  6. Private DNS failure. Use a hostname that cannot resolve inside the network. Pass: dns_error, with NXDOMAIN as client error and SERVFAIL or timeout as bad-upstream. Fail: an unclassified exception.
  7. Stale route. Change the origin IP without updating the service. Pass: connection_refused or destination_ip_unroutable, and no origin request. Fail: a 200 from an old instance.
  8. Cross-environment isolation. Bind production and staging virtual networks that both use 10.0.1.50. Pass: each reaches its own environment. Fail: cross-read, a blast-radius failure.
  9. Attribution. Filter Zero Trust Network Session Logs by SourceName. Pass: Worker name and ID appear. Fail: an empty field on a Worker deployed before attribution support; redeploy.
  10. Hyperdrive path. For a TCP service, create a Hyperdrive configuration with --service-id, bind it, and run a read-only query. Pass: rows return. Fail: a verify_full TLS error from a private CA or hostname mismatch.

If fetch() uses a public hostname, does traffic leave the VPC? No, for a VPC Service: the configured private host and port determine routing, and the URL host only sets Host and SNI. Use a VPC Network when the URL must choose the destination.

Does a VPC binding authenticate the Worker to AWS or Azure? No. It provides a path; the origin still needs SigV4, an Entra token, mTLS, or another credential.

Why not keep the tunnel and the AWS VPC in one Terraform state? The credentials, lifecycle, and blast radius differ; separate states let one cloud rotate or fail without rewriting the other.

Unresolved limitations. No hosted execution was performed, so every operational observation is an expected result or documented error code, not a measurement. Workers VPC is beta; its API, limits, and pricing may change. Custom CA upload is unsupported at the verification date, and the docs describe server-certificate verification but not a Worker client-certificate option; do not design around Worker mTLS without re-checking. connect() over VPC Networks supports plaintext TCP only. Residency is contractual, not a routing guarantee. Pulumi parity with the Terraform resource was not verified.

Verification note. Behavior, roles, limits, and error codes were checked against Cloudflare documentation on 2026-11-05, including Get started (2026-10-12), VPC Services (2026-10-12), VPC Networks (2026-10-29), Binding API (2026-09-16), Limits (2026-09-16), Pricing (2026-09-16), Troubleshooting (2026-09-29), Tunnel (2026-04-22), Hardware requirements (2026-04-22), and Hyperdrive's private-database guide (2026-04-30). No Cloudflare account, tunnel, Worker, AWS VPC, or Azure VNet was provisioned. No CLI, provider, or runtime version was executed; version statements are documentation claims, not tested compatibility results.

Authoritative references.

  • Cloudflare Workers VPC: https://developers.cloudflare.com/workers-vpc/
  • Workers VPC Get started: https://developers.cloudflare.com/workers-vpc/get-started/
  • VPC Services: https://developers.cloudflare.com/workers-vpc/configuration/vpc-services/
  • VPC Networks: https://developers.cloudflare.com/workers-vpc/configuration/vpc-networks/
  • Workers Binding API: https://developers.cloudflare.com/workers-vpc/api/
  • Workers VPC Limits: https://developers.cloudflare.com/workers-vpc/platform/limits/
  • Workers VPC Pricing: https://developers.cloudflare.com/workers-vpc/platform/pricing/
  • Workers VPC Troubleshooting: https://developers.cloudflare.com/workers-vpc/reference/troubleshooting/
  • Workers VPC Terraform: https://developers.cloudflare.com/workers-vpc/configuration/vpc-services/terraform/
  • Cloudflare Tunnel for Workers VPC: https://developers.cloudflare.com/workers-vpc/configuration/tunnel/
  • Tunnel hardware requirements: https://developers.cloudflare.com/workers-vpc/configuration/tunnel/hardware-requirements/
  • Hyperdrive with Workers VPC: https://developers.cloudflare.com/hyperdrive/configuration/connect-to-private-database-vpc/
  • Hyperdrive with Tunnel and Access: https://developers.cloudflare.com/hyperdrive/configuration/connect-to-private-database/
  • VPC Networks public beta changelog: https://developers.cloudflare.com/changelog/post/2026-04-14-vpc-networks/
  • Hyperdrive VPC changelog: https://developers.cloudflare.com/changelog/post/2026-04-29-hyperdrive-vpc-private-databases/
  • AWS Signature Version 4: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_aws-signing.html
  • AWS PrivateLink: https://docs.aws.amazon.com/vpc/latest/privatelink/what-is-privatelink.html
  • Azure private endpoints: https://learn.microsoft.com/en-us/azure/private-link/private-endpoint-overview
  • Microsoft identity platform client credentials: https://learn.microsoft.com/en-us/entra/identity-platform/v2-oauth2-client-creds-grant-flow

Next in the Series

In Turn Cloudflare Traffic Into Useful Evidence, we'll explore Connect aggregate analytics, events, logs, and external investigations.