HomeInsightsBlogYou are here
From Public Endpoints to Private Paths: Serverless Compute to AWS-Managed Resources, End to End
Blog

From Public Endpoints to Private Paths: Serverless Compute to AWS-Managed Resources, End to End

Nov 30, 2026Fowzan8 min read

Introduction

For years, a Lambda function calling S3, DynamoDB or Secrets Manager simply sent its traffic to a public endpoint. For regulated teams in finance, healthcare and government, the first review question was always: “Does any of this traffic touch the public internet?”

Today you can build a serverless application where every hop stays on private IP addresses inside AWS. That includes the client calling your function, the function calling managed services, and managed orchestrators calling your private APIs. The building blocks are generally available across the main serverless services. The latest addition is PrivateLink support for AWS Lambda MicroVMs, announced in August 2026.

A simple way to picture it: Your company and a bank branch are in the same office building. The public-endpoint way is to leave through the front door, walk down the public street and enter the bank from outside. Your ID still protects you, but you are on the street and nothing stops you walking to a different bank. The private-path way is an internal corridor straight to the branch. You never step outside, and the corridor only leads to approved places. This post is about building those corridors for serverless.

Why Private Paths Matter

  • Smaller exposure. If a VPC needs a NAT gateway just so a function can reach S3, compromised code can use that same path to send data anywhere on the internet.
  • A provable data perimeter. Security teams want to show that sensitive data can only be reached by approved identities, from approved networks, into approved resources.
  • Compliance and cost. Many policies require private connectivity, and replacing NAT gateways with VPC endpoints often simplifies the network and lowers cost.

The Three Directions of Serverless Traffic

DirectionExampleHow to keep it private
Out from serverless to AWS servicesA function reads S3, fetches a secret, calls BedrockLambda VPC attachment plus gateway and interface VPC endpoints
Into serverlessAn app or on-premises system invokes a function or APILambda interface endpoint (PrivateLink), private API Gateway APIs, MicroVMs endpoints
AWS services calling your private APIsStep Functions calls an API on an internal load balancerVPC Lattice resource gateways and resource configurations

Part 1: From Lambda to AWS Services

When you attach a function to your subnets, Lambda creates shared, service-managed Hyperplane network interfaces in them. From then on, the function can reach only what your VPC can reach. With no NAT gateway, it has no route to the internet, which is what we want, as long as we give it private routes to the services it needs.

Example: You attach OrdersFunction to private subnets with no NAT gateway. You add an S3 endpoint but forget an external payment API. The S3 call works. The payment call returns no error; it just waits until “Task timed out after 30 seconds”. In a private VPC, a missing path usually looks like a timeout, not an error.

Gateway endpoints and interface endpoints

There are two kinds of VPC endpoint, and the difference confuses many people.

A gateway endpoint is a signpost in your route table. It exists only for S3 and DynamoDB and is free. Adding one gives the route table a new line that says “anything going to S3, take the private road”:

VPC Route Table
Destination              Target
10.0.0.0/16              local
pl-78a54011 (S3 list)    vpce-0a1b2c3d4e5f (S3 gateway endpoint)

An interface endpoint is a private phone extension on your floor. It places network interfaces with private IPs in your subnets. With private DNS enabled, the normal service name now resolves to those private IPs. Your code does not change:

Private DNS Resolution
Before:  secretsmanager.ap-south-1.amazonaws.com -> 13.235.x.x  (public)
After:   secretsmanager.ap-south-1.amazonaws.com -> 10.0.1.25, 10.0.2.31
DimensionGateway endpointInterface endpoint
ServicesS3 and DynamoDB onlyMost AWS services
How it worksRoute table entryPrivate IPs in your subnets
Reachable from on premisesNoYes, over Direct Connect or VPN
CostFreeHourly per AZ plus per GB

A typical serverless VPC needs gateway endpoints for S3 and DynamoDB, plus interface endpoints for Secrets Manager or Parameter Store, KMS, SQS, SNS, EventBridge, STS, and Lambda itself if functions call other functions. Deploy each interface endpoint in at least two Availability Zones and allow port 443 only from the function security group.

Part 2: Invoking Serverless Privately

Lambda has supported PrivateLink since 2020, and added IPv6 and dual-stack endpoints in April 2025. Create an interface endpoint for the Lambda service and clients in your VPC, or on premises over Direct Connect or VPN, can invoke functions with no internet gateway or NAT. For HTTPS clients, a private REST API in API Gateway is reachable only through an execute-api endpoint, and its resource policy decides which endpoints or accounts may call it.

Example: A bank’s core system in its Mumbai data centre must call a Lambda function every night, without using the internet. The team creates a Lambda interface endpoint and points on-premises DNS for lambda.ap-south-1.amazonaws.com at a Route 53 Resolver inbound endpoint. The core system now resolves Lambda to 10.20.1.40 and sends the call over Direct Connect, using the normal SDK and hostname.

Lambda MicroVMs. Since August 2026, MicroVMs also support PrivateLink. A VPC endpoint lets you call the MicroVM APIs, such as creating images or launching MicroVMs, and connect privately to each MicroVM’s HTTP endpoint. AWS aims this at regulated workloads that need strict network isolation. It follows the same endpoint pattern as the Lambda API.

Part 3: AWS Services Calling Your Private APIs

EventBridge API destinations and Step Functions HTTP tasks used to reach only public endpoints. To call an API on an internal load balancer or on premises, teams put a “proxy” Lambda function inside the VPC. Since December 2024, PrivateLink and VPC Lattice provide two building blocks that remove the proxy:

  • Resource gateway: the entry point into the VPC that owns the resource.
  • Resource configuration: names one resource (a domain, an IP address, or an AWS resource such as an RDS database), says how it can be reached, and can be shared with other accounts using AWS RAM.
A simple way to picture it: The resource gateway is the security gate of a campus. The resource configuration is a visitor pass that opens exactly one room. AWS RAM is how you hand the pass to another account. The pass gets you through the gate and into that room, nowhere else.

Worked example: a private fraud API in another account

The Fraud team (account B) runs a scoring API on an internal load balancer at fraud.internal.example.com, port 443. The Orders team (account A) has a Step Functions workflow that must call it. Before, account A needed VPC peering and a proxy function. Now it takes four steps:

  1. Account B creates a resource gateway in the load balancer’s VPC.
  2. Account B creates a resource configuration for fraud.internal.example.com on port 443 only.
  3. Account B shares that resource configuration with account A through AWS RAM.
  4. Account A creates an EventBridge connection marked as private, selects the shared resource configuration, and stores the API key. The Step Functions HTTP task then calls https://fraud.internal.example.com/v1/score using that connection.

Account A can reach that one API and nothing else in account B. The Fraud team sees the access in CloudTrail and can remove it by ending the RAM share. The proxy function is gone. The same approach works for on-premises APIs: point the resource configuration at the on-premises IP address reached over Direct Connect.

Putting It Together: Follow One Request

Here is one order moving through a fully private design. Note that no step needs a public IP or a NAT gateway.

StepWhat happensPrivate path used
1Internal web app calls the private orders APIexecute-api interface endpoint (10.1.3.15)
2API Gateway checks its resource policy and invokes OrdersFunctionInside AWS
3Function reads DynamoDB and saves the invoice to S3Gateway endpoints
4Function fetches a password from Secrets Manager and decrypts with KMSInterface endpoints (10.0.1.25)
5Function publishes OrderPlaced to EventBridge, which starts a workflowEventBridge interface endpoint
6Workflow calls the fraud API in account B and an on-premises inventory systemResource configurations via VPC Lattice

A good test in a non-production account: remove the internet gateway from every VPC. If orders still complete, your design is truly private.

Security: Two Guards, Two Directions

Private networking alone is not enough. Combine it with two kinds of policy:

  • Endpoint policy, the guard at your exit. It checks where you are going. For example, allow S3 access only to buckets in your organisation (condition aws:ResourceOrgID).
  • Resource policy, the guard at the destination. It checks where you came from. For example, a bucket policy that denies any request not arriving through your endpoint (condition aws:SourceVpce), with an exception for your deployment role so CI/CD still works.
ScenarioExit guard (endpoint policy)Destination guard (bucket policy)Result
Function saves an invoice to our bucketOur organisation: allowedCame via our endpoint: allowedSucceeds
Malicious code copies data to an attacker’s bucketNot our organisation: deniedNot reachedBlocked at exit
Attacker uses stolen credentials from a laptopNot involvedNot via our endpoint: deniedBlocked at destination

Without the endpoint policy, the second attack succeeds. Without the bucket policy, the third one does. Apply the same conditions across all accounts with service control policies and resource control policies, and use Lambda condition keys such as lambda:VpcIds so functions can only be deployed into approved networks.

DNS: Where Most Rollouts Break

Private DNS on an interface endpoint only works inside the VPC where the endpoint lives.

Example: A platform team puts all endpoints in one shared VPC and connects 20 application VPCs through Transit Gateway. In VPC 7, a KMS call times out. The route is fine, but in VPC 7 the KMS name still resolves to a public IP. The fix is a Route 53 private hosted zone for kms.ap-south-1.amazonaws.com that points to the shared endpoint, associated with all 20 VPCs. On-premises clients need a Route 53 Resolver inbound endpoint for the same reason.

Cost in One Example

Gateway endpoints are free. Interface endpoints and NAT gateways charge per hour and per GB. Suppose your functions send 10 TB a month to S3 through NAT. At an illustrative $0.045 per GB, that is about $450 a month just for NAT processing. An S3 gateway endpoint brings it to zero. But if you send only 2 GB a month to Secrets Manager, an interface endpoint will cost more than it saves; you add it for security, not savings. Check current prices for your Region.

Troubleshooting Guide

What you seeLikely cause
“Task timed out”No network path: missing endpoint, wrong route table, or DNS still returns a public IP
“Connect timeout on endpoint URL”Security group or network ACL blocks port 443
“AccessDenied ... no VPC endpoint policy allows”Endpoint policy is too strict
“AccessDenied ... explicit deny in a resource-based policy”Resource policy condition such as aws:SourceVpce does not match

VPC Flow Logs show whether traffic reaches endpoints or still heads to a NAT gateway, and CloudTrail records the endpoint ID on each API call, which is useful evidence for auditors.

Migration Checklist

  1. List every service and external API each function calls, using X-Ray, CloudTrail and NAT flow logs.
  2. Add S3 and DynamoDB gateway endpoints everywhere. They are free.
  3. Add interface endpoints, centrally if you run many accounts, in at least two AZs with private DNS.
  4. Replace proxy functions with EventBridge connections and Step Functions HTTP tasks backed by resource configurations.
  5. Move internal callers to the Lambda endpoint or private API Gateway APIs, and add MicroVMs endpoints if you use them.
  6. Remove the NAT route in a test environment, run integration tests and watch for timeouts.
  7. Lock it in with endpoint policies, resource policies and organisation-wide guardrails.

Conclusion

Every direction of serverless traffic now has a generally available, private option: VPC endpoints for calls out of Lambda, PrivateLink and private APIs for calls in, and VPC Lattice resource configurations for EventBridge and Step Functions calling your private systems. The shift is from “public endpoints protected by credentials” to “private paths protected by credentials, networks and policies together”. Start with the free gateway endpoints, remove your proxy functions, close the NAT path, and turn the result into guardrails.

References

  • AWS What’s New: AWS Lambda MicroVMs now supports AWS PrivateLink (25 August 2026)
  • AWS What’s New: AWS Lambda now supports inbound IPv6 connectivity over AWS PrivateLink (17 April 2025)
  • AWS What’s New: Access to VPC resources over AWS PrivateLink; EventBridge and Step Functions integration with private APIs (1 December 2024)
  • AWS Compute Blog: Simplifying private API integrations with Amazon EventBridge and AWS Step Functions
  • Amazon EventBridge User Guide: Connecting to private APIs in EventBridge

Related Articles

WhitepaperNov 2026Whitepaper

Choosing a Data Platform for AI Application Development: Open Tables, Connected Context

Table formats have converged on Iceberg, moving the expensive decision elsewhere: agent permissions, scan costs, and semantic definitions. A comprehensive 5-platform architectural evaluation across Databricks, Snowflake, BigQuery, Fabric, and AWS.

Read Article
BlogNov 11, 20266 min read

Can Buyers Find You in ChatGPT Before They Know Your Name?

If a buyer asks ChatGPT for help with a problem your team knows how to solve, could the answer point them to you before they make a shortlist? How Answer Engine Optimization (AEO) changes enterprise buyer discovery.

Read Article
BlogNov 202611 min read

Open Tables, Closed Context: Choosing a Data Platform for AI Application Development

Table formats have converged on Iceberg, moving the expensive decision elsewhere: agent permissions, scan costs, and semantic definitions. A 5-platform evaluation across Databricks, Snowflake, BigQuery, Fabric, and AWS.

Read Article