AWS Lambda Deep Dive: The Parts No One Talks About
How AWS Lambda behaves in production: the Init/Invoke/Shutdown lifecycle, concurrency limits, Hyperplane ENIs, NAT cost, RDS Proxy, and when to move to ECS.

On this page
Most content about AWS Lambda stops at the marketing level:
No servers, auto-scaling, pay-per-use, magic.
In production, Lambda is not magic. It’s a very opinionated compute platform with sharp edges in networking, databases, concurrency and cost. If you don’t understand what happens under the hood, it will absolutely punch your architecture in the face at scale.
This post goes deep into the parts people usually skip:
- What actually is an execution environment, and what happens in Init → Invoke → Shutdown
- How the concurrency engine works: account concurrency, scaling rate, and what throttling looks like
- How Lambda runs inside its own AWS-managed VPC, and how it connects to your VPC with Hyperplane ENIs
- Why putting Lambda in a VPC changes networking, internet access, NAT cost and IPv4 pressure (and why cold starts are no longer the reason)
- Why Lambda + RDS without RDS Proxy is essentially trying to use a relational DB like DynamoDB
- How RDS Proxy actually multiplexes connections and where the limits are
- When Lambda is the right tool vs when ECS/EC2 is the sane option
The target audience is senior engineers and architects. No “hello world” here.
What does Lambda actually run? Execution environments
Most people think “Lambda invocation = isolated container = done.” The real model is slightly more complex and much more important.
Lambda’s own VPC and the hidden control plane
Every Lambda function runs inside a VPC owned and managed by the Lambda service, not inside your account VPC. That Lambda-owned VPC is invisible to you.
From there, the Lambda control plane:
- Creates execution environments (sandboxed runtime instances)
- Connects them to your VPC if needed
- Manages lifecycle (init, invoke, shutdown)
- Bills you based on INIT and INVOKE phases
You never see these internal VPCs or their subnets. You only see the logical function and (optionally) the ENIs in your VPC.
The execution environment lifecycle: Init, Invoke, Shutdown
module scopecreatedExecution Environment Lifecycle
- Cold start: Init (extension, runtime, function) → Invoke → Invoke → … → Shutdown (runtime, extension)
- Warm start: Init skipped → Invoke → Invoke → … → Shutdown
Between invocations the environment is frozen. Anything created at module scope during Init is reused by every later invocation and destroyed only at Shutdown.
For each environment, Lambda follows a well-defined lifecycle:
1 — INIT (cold start)
Triggered when Lambda needs a new environment:
- Launches the sandbox and downloads your code bundle (zip or image)
- Initializes any registered extensions
- Bootstraps the runtime (Node, Python, etc.)
- Runs the global scope of your code (everything outside the handler)
Lambda and the runtime communicate via the Runtime API, and extensions use the Extensions API. Both keep calling a “next event” style endpoint until there’s work to do.
One limit people only discover in production: on-demand functions get 10 seconds for INIT. If your global scope takes longer (a slow secret fetch, a huge ORM bootstrapping its metadata), Lambda times it out and retries the init as part of the first invocation, now counted against the function timeout. Keep INIT well under that budget, or move it ahead of traffic with Provisioned Concurrency or SnapStart.
2 — INVOKE
When your handler function is executed:
- Lambda calls your handler with event and context
- Your code runs, does I/O, DB calls, etc.
- Logs are shipped to CloudWatch via the Lambda service plane (not through your VPC ENI)
3 — REUSE (warm start)
When a new invocation is routed to that environment:
- Lambda resumes the runtime and extensions
- Skips INIT
- Jumps straight into the handler
Any state stored at module/global scope is still there.
4 — SHUTDOWN
When Lambda decides the environment is no longer needed:
- It signals shutdown to the runtime and extensions
- Extensions get a short window to flush (around 2 seconds at most with external extensions; the runtime itself gets a
SIGTERMonly when extensions are registered) - The environment is destroyed
If you buffer telemetry in memory and expect a graceful shutdown hook to flush it, you will lose data. Flush at the end of each invocation, or use an extension designed for it.
Architectural implication:
Everything you put outside the handler is per-container state, not per-invocation state. You get reuse and performance if you use it well, and really weird bugs if you leak mutable state across invocations.
Cold start vs warm start: why it matters
Cold start isn’t a bug; it’s the price you pay for “no resources allocated when idle”.
What increases cold start time
Things that make cold starts slower:
- Large bundle size (zip or container image)
- Heavy runtimes (Java / .NET > Node / Python)
- Code executed in global scope: ORMs, big SDKs, eager clients (DB, Redis, etc.)
- Complex extensions (logging, tracing, etc.) doing work in INIT
- Network calls during INIT: fetching secrets, config or feature flags before the first request
Notice what’s not on that list anymore: attaching the function to a VPC. Before Hyperplane ENIs (rolled out in 2019), a VPC cold start could mean creating an ENI on the spot, and that cost seconds. Today the ENI is created when you create or reconfigure the function, not when an environment starts, so VPC attachment adds essentially nothing to a normal cold start. If someone still tells you to keep Lambda out of a VPC “for cold starts”, that advice has been stale since 2019.
The VPC penalty that survives is a different one: if a VPC-attached function stays idle for 14 days, Lambda reclaims its Hyperplane ENI and marks the function Inactive. The next invocation fails, and the function sits in Pending until a new ENI is ready, which can take minutes. That’s not a slow cold start; it’s an error. Rarely used functions (monthly jobs, break-glass tooling) need retries that tolerate it.
How Lambda bills INIT vs INVOKE
Lambda conceptually splits execution into:
- INIT: cold start work (global code + extension init)
- INVOKE: handler execution
For a long time, INIT on zip-packaged functions with managed runtimes was effectively free: it didn’t count toward billed duration. That ended on August 1, 2025. INIT is now billed across every configuration, at the same rate as invoke duration. For most workloads cold starts are a small fraction of invocations, so the bill barely moves. But a function that does heavy work in global scope and scales up and down a lot now pays for that work every single time, which makes INIT overhead very visible on the bill if you screw it up.
Mitigations that actually work
- Keep global-scope work minimal and focused
- Use lazy initialization inside the handler only for heavy, rarely used components
- Use smaller bundles, tree-shaking, and minimal dependencies
- Provisioned Concurrency / SnapStart (Java, Python and .NET) when strict p99 latency matters
SnapStart has its own gotcha: it snapshots the initialized environment and restores it many times. Anything that must be unique per environment (random seeds, unique IDs generated at init, open network connections) gets cloned along with the snapshot. Use the runtime hooks to re-create those after restore.
Concurrency and scaling: Lambda doesn’t scale “code”, it scales containers
Concurrency in Lambda = number of invocations actively running at the same time.
Account-level vs function-level concurrency
- Each account/Region gets a default concurrency quota of 1,000 concurrent executions across all functions (raise it through Service Quotas; brand-new accounts can start lower, so check before a launch)
- Functions share this pool
- You can configure reserved concurrency per function:
- It caps how much concurrency a function can use
- It guarantees that concurrency to that function (it can’t be stolen by others)
- Lambda always keeps 100 units unreserved for everything else, so you can’t reserve the whole pool
This is not just “nice isolation”. It’s how you stop a single hot function from:
- Starving other functions
- Overloading shared backends (DB, Redis, NAT, etc.)
Burst limits and scaling rate
Lambda doesn’t instantly jump from 0 to 10k concurrent containers. There is a scaling rate:
-
Each function can add up to 1,000 new execution environments every 10 seconds, in every Region. The rate is per function, so functions scale independently of each other.
-
Unused rate doesn’t accumulate: a quiet minute doesn’t buy you a bigger burst later.
-
Scaling continues at that pace until:
- traffic is served, or
- the function hits its concurrency limit.
-
If demand exceeds:
- the scaling rate,
- the account concurrency, or
- the function’s reserved concurrency,
Lambda starts throttling (
TooManyRequestsException, HTTP 429).
If you learned Lambda before late 2023, update your mental model: the old Region-dependent initial burst (500 to 3,000) followed by +500 per minute is gone. The current model is much faster, which is great for fan-out and worse for whatever sits behind the function.
What a throttle means depends on how the function is invoked. Synchronous callers (API Gateway, your SDK call) get the 429 and must retry themselves. Asynchronous invocations are queued and retried by Lambda for up to six hours. Event source mappings (SQS, Kinesis, DynamoDB Streams) back off and retry, so throttles show up as growing queue age or iterator age instead of errors. Same throttle, three very different symptoms.
Architectural implication:
Lambda scaling is fantastic at fan-out, but “high burst + relational DB + no limits” is a great way to create a self-inflicted outage.
Lambda outside a VPC: simple outbound, no private network
When you don’t attach Lambda to a VPC:
- All networking happens via the Lambda service’s own VPC, with internet egress managed by AWS.
- It can call:
- public internet, or
- public AWS endpoints (e.g. s3.amazonaws.com)
- It can’t reach:
- RDS in private subnets
- EC2 in private subnets
- internal ALBs / NLBs.
This mode is:
- Simple
- Cheaper (no NAT Gateway in your account)
- Free of the subnet, ENI and route table planning that comes with a VPC
…but useless if you need private resources (RDS in private subnets, ElastiCache, internal services). What it does not buy you anymore is faster cold starts: since Hyperplane, a VPC-attached function starts just as fast. Choose this mode for what it removes from your architecture, not for latency.
It also gives you no stable egress IP. If a partner needs to allowlist your function’s source address, you’re back to a VPC and a NAT Gateway with an Elastic IP.
Lambda in a VPC: Hyperplane ENIs and the real traffic flow
Lambda ENI attachment before and after Hyperplane ENIs
Attaching Lambda to a VPC used to create one ENI per execution environment in your subnets. That didn’t scale well at all. AWS fixed this by introducing Hyperplane ENIs and V2N (VPC-to-VPC NAT).
Hyperplane: how Lambda connects to your VPC
The modern flow looks like this:
- Your function is still running in the Lambda service VPC.
- Lambda creates a Hyperplane ENI in your VPC:
- It’s a managed ENI that lives in your subnet
- It gets an IP address from your subnet CIDR
- It has your security group attached
- Traffic from many execution environments in the Lambda service VPC is routed through an internal service (Hyperplane) to this ENI using V2N (VPC-to-VPC NAT).
- From your point of view, all Lambda traffic appears to come from that ENI inside your VPC.
Key details:
- One Hyperplane ENI can serve many execution environments that share the same (subnet, security group) combination. There is no longer a 1:1 mapping.
- Hyperplane removes most of the ENI explosion problem that existed in the old model.
- Each Hyperplane ENI has internal limits (e.g. ~65k concurrent connections), but that’s usually plenty for typical architectures.
- When a single Hyperplane ENI is close to its limit, Lambda detects it and allocates more ENIs for the same subnet/SG combo. You don’t need to do anything.
- Still, each Hyperplane ENI consumes one IP from your subnet, and there are capacity limits.
A “public subnet” does not give Lambda a public IP
The official docs are explicit: attaching a function to a public subnet does not give it a public IP or direct internet access.
- Even if you select a public subnet, the ENI for Lambda does not get a public IP
- Lambda does not support assigning public IPs to Lambda ENIs
- Outbound IPv4 internet access from Lambda in VPC requires:
- A NAT Gateway
- Route from private subnet to NAT
- Internet Gateway attached to the VPC
But why?
- The execution environment itself lives in Lambda’s VPC.
- The ENI in your VPC (Hyperplane ENI) is always private.
- Lambda never attaches a public IP to that ENI.
So the outbound path is:
Lambda runtime → Lambda VPC → Hyperplane → ENI in your VPC → route table →
- NAT Gateway (for the IPv4 internet), or
- egress-only internet gateway (for the IPv6 internet, dual-stack subnets only), or
- VPC endpoints (for AWS services and PrivateLink services, privately), or
- other private IPs (RDS, EC2, etc).
There is no mode where Lambda behaves like an EC2 instance with a public IP. Attach Lambda to a VPC without a NAT Gateway and your function loses its ability to call public APIs. VPC endpoints don’t change that: they give you a private path to S3, DynamoDB, Secrets Manager, SQS and other AWS services, but they don’t reach Stripe, OpenAI or anything else on the public internet. A common production incident is exactly that: someone removes the NAT Gateway “because we have endpoints now”, and the first third-party call times out.
Request path of a VPC-attached Lambda function
- Execution environments always run in the AWS-managed Lambda service VPC. Here, four environments of function A and two of function B use the same subnet and security group, so Hyperplane (VPC-to-VPC NAT) sends all of their traffic through one shared Hyperplane ENI in your private subnet.
- That ENI takes a private IP from your subnet CIDR, has your security group attached, and never gets a public IP.
- (a) Traffic to a private resource, such as RDS in a data subnet, matches the
10.0.0.0/16 → localroute and stays inside the VPC. - (b) Traffic to a public API matches
0.0.0.0/0 → nat-gw. The NAT Gateway in a public subnet translates it to its Elastic IP and sends it out through the Internet Gateway. - A route straight to the Internet Gateway goes nowhere because the ENI has no public IP. Without a NAT Gateway, a VPC-attached function cannot reach the public IPv4 internet.
IPv4 exhaustion in Lambda-heavy subnets
Hyperplane ENIs still consume IPs from your subnet.
If you:
- choose very small CIDRs (e.g. /28, /27, /26),
- have several Lambda functions attached,
- plus RDS, ECS, NAT, interface endpoints in the same subnets,
you can hit “insufficient IPs in subnet” under bursts or heavy use.
Best practice for Lambda-heavy workloads:
- Use reasonably large private subnets (/24 or larger) for Lambda and app traffic.
- Keep DB and other stateful components in separate subnets if you want stricter separation.
- Reuse the same subnet and security group combination across functions where it makes sense: Hyperplane ENIs are shared per combination, so a unique security group per function means more ENIs and more IPs.
Going dual-stack doesn’t get you out of this one. Lambda only supports IPv6 in dual-stack subnets, not IPv6-only ones, so every Hyperplane ENI still takes an IPv4 address from the subnet.
NAT Gateway: the hidden tax of Lambda in a VPC
Once Lambda is in your VPC and needs to call public APIs (OpenAI, Stripe, third-party services, etc.), all outbound IPv4 traffic goes through NAT Gateway in a public subnet.
You pay:
- Hourly fee (fixed, per NAT, and you want one per AZ for availability)
- Per-GB processed fee (this is the killer: in us-east-1 it’s $0.045/GB, on top of normal data transfer out)
- The public IPv4 address on the NAT: since February 2024, AWS bills every public IPv4 address, Elastic IPs included
Prices as of December 2025, when I wrote this. AWS pricing changes, so check the current pricing page before you decide.
Lambda’s characteristics:
- Can spin up lots of execution environments quickly
- Each environment can open its own outbound connections
- Many short-lived connections mean lots of TCP/TLS overhead
Result: heavy outgoing traffic from Lambda in a VPC can generate a very visible NAT bill.
ECS/EC2 can be deployed in a public subnet with public IP, talking directly through IGW with no NAT processing fee (you still pay for the public IPv4 address and for data transfer out). Lambda can’t do that: its ENIs are always private.
Architecturally:
- For light outbound use, NAT cost is negligible.
- For heavy outbound APIs (especially with big payloads), Lambda in VPC can easily turn into your largest single line item in the networking bill.
Cutting the NAT bill
Before you move anything off Lambda, check where the NAT bytes actually go. In production, a surprising share is usually traffic to AWS itself:
- S3 and DynamoDB: add gateway endpoints. They’re free, they’re just route table entries, and that traffic stops touching the NAT entirely. If your functions read or write S3 through a NAT, this is the cheapest fix you’ll ever ship.
- Other AWS services (Secrets Manager, SQS, ECR, CloudWatch, STS): interface endpoints have an hourly fee per AZ and a much smaller per-GB fee. Worth it for chatty services, not for every service by default.
- IPv6-capable destinations: in dual-stack subnets with
Ipv6AllowedForDualStackenabled, a route for::/0to an egress-only internet gateway gives your function outbound IPv6 with no NAT in the path. It only helps when the destination supports IPv6, so it complements the NAT rather than replacing it. - Everything else: that’s your real third-party egress. If it’s big and constant, that’s a signal for the ECS discussion below, not a NAT tuning problem.
VPC Flow Logs on the NAT’s network interface, grouped by destination, will tell you which bucket you’re in within an afternoon.
Why Lambda + RDS without RDS Proxy is dangerous
Relational databases and Lambda don’t naturally mix at scale if you connect them directly. The official docs explicitly recommend using Amazon RDS Proxy when Lambda makes lots of short connections or frequently opens/closes connections.
What happens with direct connections
Typical setup:
- Each Lambda execution environment initializes a DB client
- Often, each environment holds:
- 1 connection, or
- a small pool of connections
Under a traffic spike:
- Lambda scales up: many new environments are created
- Each environment opens 1+ new connections
- Concurrent invocations → many concurrent DB connections
- Deploys kill warm containers and create new ones, and all of them open new connections again (not always in that order: new containers can be created before all the old ones are gone)
From the DB’s perspective:
- High connection churn
- Sudden spikes in max_connections
- Increased CPU/memory overhead managing connection backends
- Higher probability of hitting “too many connections” errors
Relational databases are not designed for:
- thousands of very short-lived connections,
- aggressive parallel open/close patterns.
They want relatively stable pools with fewer total connections.
How RDS Proxy changes the game
RDS Proxy sits in front of RDS/Aurora and:
- Maintains a pool of warm DB connections
- Multiplexes many Lambda client connections onto a smaller set of DB connections
- Manages authentication and failover behavior
Under the hood:
- Your Lambda function connects to RDS Proxy instead of the DB endpoint.
- The proxy terminates the client connection and forwards it to one of the pooled DB connections.
- While a transaction is open, your client keeps the same DB connection; the proxy only hands that connection to another client at a transaction boundary.
- Between transactions, connections are reassigned across pooled DB sessions. That reuse is the multiplexing.
The catch is pinning. If your session changes state the proxy can’t safely carry over (a SET of a session variable, temporary tables, some uses of prepared statements, advisory locks, depending on the engine), the proxy pins your client to one DB connection until the client disconnects. A pinned connection isn’t multiplexed anymore, and with enough pinned clients you’re back to one DB connection per execution environment, just with an extra hop and an extra bill. Watch the DatabaseConnectionsCurrentlySessionPinned metric, and treat “my ORM runs a SET on every connect” as a bug to fix, not a detail.
What you gain:
- Fewer actual DB connections, even under Lambda bursts
- More predictable load during deploys and spikes
- Less resource waste on the DB server
Important things to know:
- RDS Proxy doesn’t magically remove all concurrency; it compresses many client connections into a smaller set of backend DB connections.
- You still need to control Lambda concurrency, but the DB sees far fewer connections than the raw Lambda execution environments would otherwise create.
Either way, the DB is no longer exposed directly to Lambda’s raw fan-out pattern.
Lambda concurrency vs. database connections, assuming one connection per execution environment, max_connections = 1,000 and an RDS Proxy pool of 100:
| Concurrent requests | Execution environments | DB connections, direct | DB connections, RDS Proxy |
|---|---|---|---|
| 500 | 500 | 500 | 100 |
| 800 | 800 | 800 (80% of the limit) | 100 |
| 1,000 | 1,000 | 1,000 (limit reached) | 100 |
| 1,500 | 1,500 | 1,500 (500 refused) | 100 |
Direct connections grow one-for-one with concurrency until the database refuses them; behind RDS Proxy the database sees the same small pool at any concurrency.
Reusing external clients correctly across invocations
Given the Init → Invoke → Reuse lifecycle, the correct pattern for clients (DB, cache, S3, etc.) is:
- Initialize once at global scope, reuse across invocations inside an environment
- Do not recreate heavy clients on every handler call
- Treat the handler as stateless, but the environment as a reusable container for expensive objects
Example (Node.js):
// index.mjs. Module scope lives as long as the execution environment.
import pg from "pg";
let clientPromise;
function getClient() {
if (!clientPromise) {
const client = new pg.Client({ connectionString: process.env.DB_URL });
// A pg Client can't reconnect once it dies, so drop it and build a new one next time.
client.on("error", () => {
clientPromise = undefined;
});
clientPromise = client.connect().then(
() => client,
(err) => {
clientPromise = undefined;
throw err;
},
);
}
return clientPromise;
}
export const handler = async () => {
const client = await getClient();
const result = await client.query("SELECT id, email FROM users LIMIT 10");
return { users: result.rows };
};jsKey points:
- The client is reused across warm invocations
- Connection is established once per environment, not once per invocation
- A dead connection doesn’t poison the environment: the next invocation builds a new client
- You still treat each invocation as independent from a logical/business standpoint
That third point is the one people skip. The connection outlives your invocations, so it also outlives things you don’t control: a database failover, RDS Proxy closing idle client connections, a network blip while the environment was frozen. A naive “connected once, flag set to true” cache keeps handing out a dead client until the environment is recycled, and that shows up as a burst of errors from a few unlucky environments while the rest are fine.
Bad patterns:
- Opening and closing a DB connection on every handler execution
- Storing mutable per-request state in globals
- Assuming /tmp always starts empty or is never reused
Lambda vs ECS/EC2: when does Lambda stop making sense?
Once you know how Lambda actually works, choosing between Lambda and ECS becomes much more obvious.
Where Lambda is the right tool
Lambda is usually a win for:
- Event-driven workloads: S3 upload processing, SQS consumers, DynamoDB streams, EventBridge rules.
- Background jobs that are:
- Short-lived
- Idempotent
- Parallelizable.
- Glue code between managed services (S3, SQS, SNS, Step Functions, Kinesis, etc.)
- Spiky workloads where:
- Utilization is low or unpredictable
- “Pay per invocation” has real cost benefits.
- Systems that don’t lean heavily on relational databases
Where ECS (or any long-lived compute) beats Lambda
ECS/Fargate (or even EKS / EC2) tends to win for:
- High-throughput HTTP APIs with sustained load
- Always-on workloads (near-constant traffic)
- Heavy use of relational databases:
- A single task/process can serve hundreds/thousands of requests.
- One DB pool per process, not per Lambda environment
- Heavy outbound internet traffic: ECS tasks in public subnets with public IPs avoid the NAT processing fee (you pay per public IPv4 address instead)
- Strict latency SLOs (no cold start tolerance)
- Complex networking/compliance: fixed IPs, firewalls, private link / on-prem connectivity
Lambda is not “worse compute”. It’s a different tool with a very specific scaling and lifecycle model. Use it where that model fits; don’t fight it.
Production checklist: using Lambda like an adult
If you want to run Lambda seriously in production, here’s the minimum mental checklist:
- Understand execution environments
Design for Init/Invoke/Reuse and reuse clients at global scope. - Control concurrency
Use reserved concurrency on any function that hits shared backends (RDS, Redis, NAT-heavy external APIs, etc.), and know how each invocation type surfaces a throttle. - Treat VPC attachment as a design choice
Lambda in VPC = private IP only + Hyperplane ENIs + NAT for internet. Don’t just “tick the checkbox”, and don’t avoid it for cold-start reasons that stopped being true in 2019. - Size your subnets properly
Subnets that host Lambda ENIs must have enough IPs for bursts & for other infra. - Account for NAT cost and throughput
Heavy outbound traffic from VPC-attached Lambdas will show up in NAT bills. Put S3 and DynamoDB behind gateway endpoints first; it’s free. - Never do serious Lambda + RDS without RDS Proxy
Direct connections work at small scale and explode under real load. Then watch for pinning, or the proxy quietly stops multiplexing. - Know when to move APIs to ECS
If your Lambda-based API is:- always hot,
- DB-heavy, or
- outbound-heavy.
If you internalize:
- the execution environment model,
- the VPC/Hyperplane behavior,
- the DB and NAT implications,
you’re not “using Lambda” anymore; you’re operating Lambda as a platform, which is where senior engineers are supposed to be.
Final thoughts
I’m a big fan of Lambda, and it’s usually my first instinct when I’m designing a new API. The economics, the built-in scaling model, and the operational simplicity are hard to beat in the early stages of a product.
But once an API becomes truly hot (consistent traffic, a relational database in the critical path, heavy outbound calls), the architecture naturally gravitates toward ECS/EC2 or another long-lived compute model. At that point, Lambda shines much more as supporting infrastructure than as the main API runtime: SQS workers, S3 event handlers, fan-out processors, glue code around Step Functions, and other event-driven pieces.
So my rule of thumb looks like this:
- Start with Lambda for new APIs when traffic is uncertain and the system is mostly event-driven.
- Keep Lambda for side processes and asynchronous workflows.
- Move the hot path to ECS/EC2 when you know the API will sustain high volume, has strict latency constraints, or pushes hard on databases and outbound networking.
Lambda is still a core building block in modern architectures; it just doesn’t have to be the place where every single request lands.
Key takeaways
- Everything outside the handler is per-environment state: reuse clients there, and never leak mutable per-request state into globals.
- INIT has been billed for every function configuration since August 2025, and on-demand INIT gets 10 seconds; keep global scope lean.
- Concurrency is shared across the account (1,000 by default per Region) and each function scales by up to 1,000 environments every 10 seconds; use reserved concurrency to cap and protect functions that hit shared backends.
- VPC attachment no longer slows cold starts, but a VPC-attached Lambda only gets private Hyperplane ENIs: IPv4 internet access needs a NAT Gateway, VPC endpoints only reach AWS services, and ENIs consume subnet IPs.
- Most NAT bills shrink with free S3/DynamoDB gateway endpoints before any re-architecture; what’s left is your real third-party egress.
- Direct Lambda-to-RDS connections grow one-for-one with execution environments until the database refuses them; RDS Proxy multiplexes them onto a small pool, as long as session pinning doesn’t defeat it.
- Start new, uncertain or event-driven APIs on Lambda; move hot, DB-heavy or outbound-heavy paths to ECS/EC2 and keep Lambda for async work around them.