Lambda Cold Start Optimizer
What this skill does
Translates a Lambda function's cold-start posture into a concrete
latency-optimization recommendation with a millisecond-denominated
estimated latency impact. The verdict is the highest-leverage action
across seven dimensions — memory allocation, provisioned concurrency,
SnapStart, init phase optimization, VPC cold start, runtime selection,
and deployment package size — applied in priority order. Always pairs
the recommendation with exact CLI commands (or Power Tuning invocation).
Quick navigation
| Section |
What it covers |
When to jump here |
| Quick start |
Four headline rules and the cold-start formula |
First read |
| Mindset |
Why SnapStart + provisioned concurrency are the heavy levers |
Understanding the approach |
| Quick reference — verdict thresholds |
Decision matrix at a glance |
Classifying a function |
| Pre-flight data gate |
CloudWatch metrics, Lambda Insights |
Before any recommendation |
| Step 0 non-obvious behaviours |
VPC hyperplane ENI, SnapStart Java-only, X-Ray overhead |
Edge cases |
| Step 1 Memory allocation |
Power Tuning for latency-optimal memory |
The CPU-bound dimension |
| Step 2 Provisioned concurrency |
Allocation, scheduling, autoscaling |
Latency-sensitive APIs |
| Step 3 SnapStart (Java) |
Init snapshot, versioned alias requirement |
Java functions |
| Step 4 Init phase optimization |
Lazy init, connection pooling, global scope |
All runtimes |
| Step 5 VPC cold start |
Hyperplane ENI elimination, when VPC still hurts |
VPC-attached functions |
| Step 6 Runtime selection |
Compiled vs interpreted, ARM64 Graviton |
Architecture decisions |
| Step 7 Package size |
Layers, Proguarded JARs, slim ZIPs |
Large deployment packages |
| Step 8 Impact estimation |
Latency math and worked examples |
Every recommendation |
| Output format |
VERDICT block + worked examples |
Emitting the result |
| Anti-Patterns — NEVER |
Common misclassifications |
Self-check before emit |
| Pre-flight safety checks |
CONFIRM gate, version publish, alias |
Before any apply CLI |
Quick start
- SnapStart is the heaviest single lever for Java. It eliminates
the entire init phase (1-3 s for typical Spring/Java workloads) by
restoring a pre-initialized snapshot. One-line config change, no code
modification for most workloads. Available ONLY for Java (java21 and
later supported runtimes).
- Provisioned concurrency eliminates cold starts entirely — at a
price. It pre-initializes execution environments and keeps them
warm. Use it ONLY for latency-critical paths (sync APIs, interactive
endpoints) where a cold start violates the SLO. It charges for idle
time; the cost-vs-latency trade-off must be explicit.
- VPC cold start is largely solved (since 2019). Hyperplane ENIs
eliminated the 5-10 s VPC cold-start penalty. VPC-attached functions
now see <100 ms overhead on cold starts. If a function still shows
high VPC cold-start latency, check for ENI throttling or stale
configuration, not the VPC itself.
- The init phase is where most cold-start time lives. Move SDK
clients, DB connections, and heavy imports to global scope (outside
the handler). Lambda reuses execution environments across invocations;
global-scope init runs once per warm container, not per invocation.
Mindset
Cold-start optimization is a latency-vs-cost decision, not a pure
utilization exercise. The goal is the memory/concurrency/runtime/package
configuration that minimizes cold-start InitDuration AND steady-state
Duration while preserving the cost envelope — not the absolute minimum
init time at any cost.
Five-principle deep dive moved to references/advanced-patterns.md —
see "Mindset — five principles".
Quick reference — verdict thresholds
| Observation (14-30 day window) |
Verdict |
Recommendation |
| Runtime = Java AND SnapStart NOT enabled AND InitDuration p95 > 1 s |
FURTHER_OPTIMIZATION_AVAILABLE (SnapStart) |
Step 3 — enable SnapStart, publish version |
| Latency-sensitive API (sync) AND cold-start p95 > SLO AND no provisioned concurrency |
FURTHER_OPTIMIZATION_AVAILABLE (provisioned concurrency) |
Step 2 — add provisioned concurrency sized to baseline |
| Memory < 1769 MB AND Duration scales with memory (CPU-bound) AND InitDuration > 500 ms |
FURTHER_OPTIMIZATION_AVAILABLE (memory) |
Step 1 — increase memory to Power Tuning latency optimum |
| SDK clients / DB connections initialized inside handler (per-invocation) |
FURTHER_OPTIMIZATION_AVAILABLE (init phase) |
Step 4 — move to global scope |
| Package size > 20 MB AND runtime = Java AND no Proguard/SnapStart |
FURTHER_OPTIMIZATION_AVAILABLE (package) |
Step 7 — trim fat JAR, enable Proguard |
| Architecture = x86_64 AND runtime is ARM-compatible AND latency-sensitive |
FURTHER_OPTIMIZATION_AVAILABLE (architecture) |
Step 6 — migrate to arm64 for better price-performance |
| Runtime is deprecated (e.g., nodejs16, java8) AND function is latency-sensitive |
FURTHER_OPTIMIZATION_AVAILABLE (runtime) |
Step 6 — upgrade to current runtime |
| TracingConfig = Active AND X-Ray overhead > 50 ms per invocation |
FURTHER_OPTIMIZATION_AVAILABLE (tracing) |
Step 0 — evaluate sampling rate |
| All dimensions verified AND cold-start p95 < SLO AND SnapStart enabled (Java) |
OPTIMIZED |
Emit post-state verification |
| InitDuration metrics absent (Lambda Insights not enabled) |
FURTHER_OPTIMIZATION_AVAILABLE (observability) |
Enable Lambda Insights for init-duration visibility |
| Observation window < 14 days |
NEED_MORE_INFO |
Pull 14-30 day CloudWatch data, re-evaluate |
Pre-flight: data gate (run before any optimization decision)
Required data-source CLI listing moved to references/diagnostic-commands.md.
Full sequences: references/cold-start-metrics-and-power-tuning.md.
Data-quality short-circuits
| Condition |
Effect on optimization |
InitDuration absent (Lambda Insights not enabled) |
Enable Lambda Insights. Fall back to Duration spikes; mark confidence MEDIUM. |
Invocations Sum = 0 over 14 days |
Emit OPTIMIZED with note "dormant function." |
| Observation window < 14 days |
NEED_MORE_INFO. Minimum 14 days; 30 days preferred. |
| Cold-start count absent |
Estimate from ConcurrentExecutions + traffic-pattern analysis. Mark confidence MEDIUM. |
Function State != Active |
Skip optimization; surface as BLOCKED. |
| Runtime = java8 (legacy) |
SnapStart not supported. Recommend runtime upgrade first (Step 6). |
Process — Optimization logic (apply in order)
Step 0: Non-obvious behaviours that change the recommendation
Full gotcha catalog moved to references/advanced-patterns.md —
see "Step 0: Non-obvious behaviours".
Step 1: Memory allocation vs initialization time
Latency-vs-memory curve, Power Tuning detail, and cost-latency note moved to
references/advanced-patterns.md (Step 1 deep dive).
Decision gate after Power Tuning (latency mode):
Power Tuning fastest vs current MemorySize |
Verdict |
Action |
fastest at higher memory AND InitDuration reduction > 500 ms |
FURTHER_OPTIMIZATION_AVAILABLE (memory upsize) |
Set MemorySize to fastest. Verify cost envelope. |
fastest == current |
No memory finding |
Proceed to other dimensions. |
fastest at lower memory (rare for cold start) |
No finding — current is already latency-optimal |
Proceed. |
Step 2: Provisioned concurrency (allocation, scheduling, autoscaling)
Sizing CLI and scheduling detail moved to references/worked-examples.md and
references/advanced-patterns.md (Step 2 deep dive).
When provisioned concurrency is justified:
| Condition |
Recommendation |
| Sync API (API Gateway, ALB, Function URL) AND cold-start p95 > SLO |
Provisioned concurrency sized to p50-p75 of ConcurrentExecutions |
| Interactive endpoint (user-facing, <1 s SLO) AND cold starts visible |
Provisioned concurrency with autoscaling |
| Async event-driven (SQS, Kinesis, EventBridge) |
Do NOT use provisioned concurrency. Cold starts are absorbed by the queue/stream. |
| Batch job (rare invocations) |
Do NOT use provisioned concurrency. Use on-demand. |
Step 3: SnapStart (Java only — initialization snapshot)
SnapStart is the single highest-impact optimization for Java Lambda
functions. It takes a snapshot of the initialized JVM and restores it on
cold start, eliminating 1-3 s of JVM + framework init.
Eligibility:
- Runtime: java21 (or later supported Java runtimes). SnapStart is
supported on Corretto distributions.
- NOT available for: Node.js, Python, Go, Ruby, .NET.
- NOT available for: container-image functions (zip-only).
Enablement CLI, expected-impact table, and caveats moved to
references/advanced-patterns.md (Step 3 deep dive).
Step 4: Init phase optimization (lazy initialization, connection pooling)
Global-scope code pattern moved to references/worked-examples.md; runtime
connection-reuse table moved to references/advanced-patterns.md.
Init-phase checklist:
| Symptom |
Fix |
| InitDuration > 500 ms (non-Java) |
Move SDK clients, DB connections to global scope |
| InitDuration > 1 s (Java, no SnapStart) |
Enable SnapStart (Step 3) |
| InitDuration spikes after deploy |
Check for new heavy dependencies in import chain |
| DB connection per invocation |
Use global connection pool with validity check |
| HTTP client per invocation |
Use global HTTP client with keep-alive |
Step 5: VPC cold start penalty (hyperplane ENI elimination)
VPC deep dive (key fact, failure modes, diagnostic CLI, thresholds) moved to
references/advanced-patterns.md + references/diagnostic-commands.md.
Step 6: Runtime selection (compiled vs interpreted, ARM64 Graviton)
Init-speed-by-runtime table and ARM64 note moved to
references/advanced-patterns.md (Step 6 deep dive).
Recommendation framework:
| Current runtime |
Recommendation |
| Java (no SnapStart) |
Enable SnapStart (Step 3). If still slow, evaluate migration. |
| Java (SnapStart, still slow) |
Init phase optimization (Step 4) + memory tuning (Step 1). |
| nodejs16 (deprecated) |
Upgrade to nodejs20+. Deprecated runtimes miss optimizations. |
| java8 (deprecated) |
Upgrade to java21. java8 does not support SnapStart. |
| python3.7 (deprecated) |
Upgrade to python3.12. |
Step 7: Deployment package size reduction
Package size correlates with init time. Lambda downloads, extracts, and
loads the deployment package on every cold start. Larger packages mean
longer init.
Package size thresholds:
| Package size |
Impact |
Recommendation |
| <5 MB |
Negligible init overhead |
No action |
| 5-20 MB |
Moderate init overhead |
Evaluate dependency trimming |
| 20-50 MB |
Significant init overhead (100-500 ms) |
Trim aggressively |
| >50 MB |
Severe init overhead (500+ ms) |
Refactor: Proguard, Layers, or container image |
Proguard/JAR trimming, Node/Python trimming, and layer caution moved to
references/advanced-patterns.md (Step 7 deep dive).
Step 8: Impact estimation
Compute the latency impact for each recommendation:
current_cold_start_p95 = InitDuration_p95 + Duration_p95
projected_cold_start_p95 = projected_InitDuration_p95 + projected_Duration_p95
latency_reduction_ms = current_cold_start_p95 - projected_cold_start_p95
latency_reduction_pct = (latency_reduction_ms / current_cold_start_p95) × 100
Always state assumptions: cold-start frequency (invocations per day
that are cold starts), InitDuration at current and projected memory
(from Power Tuning), SLO threshold, and whether SnapStart is enabled.
Configuration dependency graph
┌─────────────────┐
│ Runtime = Java? │
└────────┬────────┘
│
┌──────────┴──────────┐
YES NO
│ │
┌──────▼──────┐ ┌───────▼───────┐
│ Enable │ │ Init phase │
│ SnapStart │ │ optimization │
│ (Step 3) │ │ (Step 4) │
└──────┬──────┘ └───────┬───────┘
│ │
└──────────┬──────────┘
│
┌────────▼────────┐
│ Cold-start p95 │
│ > SLO? │
└────────┬────────┘
│
┌──────────┴──────────┐
YES NO
│ │
┌──────▼──────┐ ┌───────▼───────┐
│ Add prov. │ │ Check memory │
│ concurrency │ │ + package + │
│ (Step 2) │ │ runtime (1,7) │
└─────────────┘ └───────────────┘
Decision order: SnapStart (if Java) → init phase optimization →
provisioned concurrency (if latency-critical) → memory tuning →
runtime/package optimization.
Output format
TARGET: <function-name>
VERDICT: OPTIMIZED | FURTHER_OPTIMIZATION_AVAILABLE
REASON: <1-2 sentences naming the recommendation and the supporting data>
RECOMMENDATION:
Current: <memory> MB, <runtime>, <architecture>, <SnapStart>, <provisioned concurrency>, <package size>
Proposed: <memory> MB, <runtime>, <architecture>, <SnapStart>, <provisioned concurrency>, <package size>
Dimensions changed: <memory | provisioned_concurrency | snapstart | init_phase | vpc | runtime | package>
Dimensions checked: <list ALL seven, each ✓ (no finding) or → (finding)>
Confidence: <HIGH/MEDIUM/LOW> — <one-line rationale>
ESTIMATED_LATENCY_IMPACT:
Current cold-start p95: <ms> (InitDuration: <ms> + Duration: <ms>)
Projected cold-start p95: <ms>
Latency reduction: <ms> (<pct>%)
SLO: p95 < <ms>
Cold-start frequency: ~<count>/day (<pct>% of invocations)
MIGRATION_STEPS:
1. <specific action with CLI command>
2. <verification step>
CONFIRM: Before executing any state-changing CLI, emit and await operator
approval: "CONFIRM: About to <action> on <function-name> in <region>.
Proceed? (yes/no)"
Full worked examples are in references/worked-examples.md.
STRICT output contract
The rules below are hard constraints. Self-check EVERY emitted block
against these rules before returning the response. Do NOT substitute
markdown headings, camelCase, or bold variants for the literal labels.
FORBIDDEN output patterns
NEVER emit VERDICT: FURTHER_OPTIMIZATION_AVAILABLE with
Latency reduction: 0 ms. If every dimension nets zero latency
delta, the verdict MUST be OPTIMIZED. A cost-only improvement is
surfaced in REASON as a cost note, NOT as latency savings.
NEVER show latency math that does not balance.
Current cold-start p95 − Projected cold-start p95 MUST equal
Latency reduction, rounded to whole milliseconds.
NEVER emit scratch lines ("WAIT — recompute", "Hmm, let me redo",
"corrected:") in the output. Finalize the math before emitting.
NEVER recommend SnapStart for non-Java runtimes. SnapStart is
Java-only. Recommending it for Node.js, Python, or Go is a
misclassification.
NEVER recommend SnapStart without warning about the versioned-alias
requirement. SnapStart requires published versions; $LATEST does
not support it. The MIGRATION_STEPS MUST include publish-version.
NEVER omit a dimension from the RECOMMENDATION block. The
Dimensions checked line MUST list all seven dimensions, each marked
✓ (no finding) or → (finding).
NEVER attribute cold-start latency to VPC without verifying ENI
health. Since 2019, hyperplane ENIs reduced VPC cold start to
<100 ms. If VPC latency is diagnosed, cite the specific ENI/subnet/SG
evidence.
NEVER round intermediate formula steps differently from the final
figure. Compute at full precision, round only the displayed result.
Perfect example output — FURTHER_OPTIMIZATION_AVAILABLE with verified math
Every field below is internally consistent. Copy this shape exactly.
TARGET: order-api-prod
VERDICT: FURTHER_OPTIMIZATION_AVAILABLE
REASON: Java 21 function with InitDuration p95 of 3200 ms and SnapStart
NOT enabled. Enabling SnapStart eliminates 90% of init phase (snapshot
restore drops InitDuration from 3200 ms to ~200 ms). Function is a
sync API with cold-start p95 exceeding the 1000 ms SLO.
RECOMMENDATION:
Current: 512 MB, java21, x86_64, SnapStart OFF, no PC, 52 MB
Proposed: 512 MB, java21, x86_64, SnapStart ON, no PC, 52 MB
Dimensions changed: snapstart (Step 3)
Dimensions checked: memory ✓ provisioned_concurrency ✓ snapstart → (enable)
init_phase ✓ vpc ✓ runtime ✓ package ✓
Confidence: HIGH — SnapStart supported on java21; no container-image.
ESTIMATED_LATENCY_IMPACT:
Current cold-start p95: 5000 ms (InitDuration: 3200 ms + Duration: 1800 ms)
Projected cold-start p95: 2000 ms (InitDuration: 200 ms + Duration: 1800 ms)
Latency reduction: 3000 ms (60%)
SLO: p95 < 1000 ms — pair with provisioned concurrency for full SLO.
MIGRATION_STEPS:
1. Enable SnapStart:
aws lambda update-function-configuration --function-name order-api-prod
--snap-start '{"ApplyOn":"PublishedVersions"}'
2. Publish a version: aws lambda publish-version --function-name order-api-prod
3. Update alias: aws lambda update-alias --function-name order-api-prod
--name prod --function-version <new-version>
4. Verify: aws lambda get-function-configuration --function-name order-api-prod
--qualifier <new-version> --query 'SnapStart.OptimizationStatus'
5. Monitor InitDuration for 7 days. If SLO unmet, add provisioned concurrency.
CONFIRM: About to enable SnapStart on order-api-prod (publish version,
update alias). Projected cold-start reduction: 3000 ms (60%). Proceed?
Self-check before emit:
Verdict semantics
| Verdict |
When to emit |
FURTHER_OPTIMIZATION_AVAILABLE |
At least one dimension has a concrete, latency-reducing recommendation. |
OPTIMIZED |
All dimensions pass (SnapStart enabled for Java, init optimized, cold-start p95 < SLO, no remaining levers). |
NEED_MORE_INFO |
Data gate failed: InitDuration metrics absent, window < 14 days, or Lambda Insights not enabled with no fallback. |
BLOCKED |
Hard precondition prevents evaluation: function State != Active, IAM denies lambda:GetFunction, runtime deprecated and blocks all optimizations. |
Zero-latency-impact rule: If latency reduction == 0 ms for every
dimension, verdict MUST be OPTIMIZED, never
FURTHER_OPTIMIZATION_AVAILABLE. Exception: a cost-only improvement
(without latency change) is surfaced in REASON as a cost note, not as
latency savings.
Anti-Patterns — NEVER (top 5)
NEVER recommend SnapStart for non-Java runtimes. SnapStart is
Java-only (java21+). Recommending it for Node.js, Python, Go, or
Ruby is a fundamental misclassification.
NEVER enable provisioned concurrency without verifying that the
function is latency-critical (sync API, interactive endpoint).
Provisioned concurrency for async/event-driven workloads is pure
waste — cold starts are absorbed by the queue or stream.
NEVER attribute cold-start latency to VPC without verifying ENI
health. Since 2019, hyperplane ENIs reduced VPC cold start to
<100 ms. Diagnosing "VPC cold start" without checking ENI/subnet/SG
is a false positive.
NEVER recommend a memory increase for cold-start optimization
without citing Power Tuning latency data. Memory increases cost;
the latency improvement must be measured, not assumed.
NEVER enable SnapStart without warning about the versioned-alias
requirement and network-connection reset. SnapStart requires
published versions and resets TCP connections on restore. Missing
these caveats causes production failures.
Extended anti-patterns in references/error-handling-and-edge-cases.md.
Expert heuristic
Full heuristic text moved to references/advanced-patterns.md —
see "Expert heuristic".
Pre-flight safety checks (run before any remediation CLI)
- MANDATORY CONFIRMATION GATE. Before any state-changing operation,
emit and await operator approval.
- Publish a version before enabling SnapStart. SnapStart applies to
published versions, not
$LATEST.
- Test SnapStart before cutover. Network connections reset on
restore; verify DB reconnection logic.
- Verify provisioned concurrency cost envelope. Idle charges must be
justified by the latency SLO.
- Test memory changes via staging alias. Higher memory increases
cost; verify latency improvement justifies.
- SnapStart + DB connections. Ensure connection validity checks
(lazy reconnect) are in place.
- Provisioned concurrency removal causes cold starts. Verify SLO
tolerates cold starts.
- Power Tuning invokes the function. Ensure idempotency.
- Bulk-operation limit: 5 functions per batch, sorted by estimated
latency impact.
Recent AWS features (2024-2026)
Feature list moved to references/advanced-patterns.md —
see "Recent AWS features (2024-2026)".
References
references/cold-start-metrics-and-power-tuning.md — Power Tuning
deployment (latency mode), Lambda Insights metrics, memory-to-CPU
mapping, SnapStart CLI sequences, ARM64 matrix, package thresholds.
references/worked-examples.md — SnapStart enablement, provisioned
concurrency sizing, init phase refactor, memory tuning, already-
optimal, NEED_MORE_INFO, end-to-end walkthrough.
References (load on demand)
- advanced-patterns.md — mindset principles,
Step 0 gotchas, per-step deep dives (memory curve, SnapStart, VPC, runtime,
package), expert heuristic, recent AWS features.
- diagnostic-commands.md — pre-flight
data-gate CLI listing, VPC/ENI and subnet diagnostics.
Domain
AWS CloudOps / Lambda Serverless Cold-Start Latency Optimization.
AWS documentation
1---2name: lambda-cold-start-optimizer3description: 'Optimises AWS Lambda cold-start latency across seven dimensions: memory allocation vs initialization time (Power Tuning latency-optimal memory), provisioned concurrency (allocation sizing and autoscaling for latency-critical paths), SnapStart (Java only — init snapshot eliminates 1-3 s of init), init phase optimization (lazy initialization, global-scope connection pooling), VPC cold start penalty (hyperplane ENI elimination since 2019), runtime selection (compiled vs interpreted, ARM64 Graviton), and deployment package size reduction (Layers, Proguarded JARs, slim ZIPs). Covers EFS mount latency, runtime deprecation impact, X-Ray overhead, and CloudWatch Lambda Insights init-duration telemetry. Emits OPTIMIZED when cold-start p95 < SLO and all init-phase levers applied, or FURTHER_OPTIMIZATION_AVAILABLE with the highest-leverage remaining lever.'4license: Apache-2.05compatibility: Agent runtime that reads SKILL.md (Claude Code, Cursor, Windsurf, Codex, Gemini). Offline recommendation classification works from pasted CloudWatch metrics and Lambda Insights traces. Live-account optimization uses aws lambda list-functions, aws lambda get-function-configuration, aws lambda get-function-event-invoke-config, aws lambda list-provisioned-concurrency-configs, aws lambda get-event-source-mapping, aws cloudwatch get-metric-statistics (Duration, InitDuration, Invocations...6metadata:7 source: https://skillmd.com/skills/jhkchan/lambda-cold-start-optimizer8 domain: aws-cloudops9 complexity: medium10 requires_llm: 'true'11 phase: '3'12 supports_pipeline: 'true'13 entry_point: 'false'14 family: Compute15 task_type: optimize16 skill_class: capability17 lifecycle_status: active18 verdict_shape: OPTIMIZED | FURTHER_OPTIMIZATION_AVAILABLE19 when_to_use: Reducing Lambda cold-start latency, sizing provisioned concurrency for latency-sensitive APIs, enabling SnapStart for Java functions, optimizing the init phase (lazy initialization, connection reuse), evaluating VPC cold-start impact, selecting a runtime for fast startup, trimming deployment package size, diagnosing EFS mount latency, assessing X-Ray tracing overhead, or reading Lambda Insights init-duration telemetry.20 when_not_to_use: Lambda cost optimization without a latency focus (use lambda-cost-optimizer), Lambda functional debugging (invocation errors, timeouts, configuration bugs — use the Lambda troubleshooter), or API Gateway latency optimization (use the API Gateway optimizer). This skill targets cold-start and init-phase latency, not dollar cost or functional correctness.21 activation_triggers: optimise Lambda cold start, Lambda init duration, Lambda InitDuration, Lambda provisioned concurrency, Lambda SnapStart Java, Lambda lazy initialization, Lambda connection reuse, Lambda VPC cold start, Lambda hyperplane ENI, Lambda runtime selection, Lambda ARM64 Graviton, Lambda deployment package size, Lambda Layers cold start, Lambda Proguard, Lambda EFS mount latency, Lambda X-Ray overhead, Lambda Insights, Lambda runtime deprecation, reduce Lambda latency, Lambda p95 latency22 invocation_schema: 'Input: either (a) a function identifier + live-account context, (b) a Lambda Insights metrics export (Duration, InitDuration, Invocations, ColdStarts), OR (c) function metadata (Runtime, MemorySize, Architecture, VpcConfig, SnapStart config, ProvisionedConcurrency config, TracingConfig, package size). Output: a deterministic TARGET/VERDICT/REASON/RECOMMENDATION/ ESTIMATED_LATENCY_IMPACT/MIGRATION_STEPS block per function, where VERDICT is one of OPTIMIZED, FURTHER_OPTIMIZATION_AVAILABLE.'23 invocation_example: "# Minimal valid input (offline classification):\nFunctionName: order-api-prod\nRuntime: java21\nMemorySize: 512 MB\nArchitecture: x86_64\nRegion: us-east-1\nSnapStart: NOT_ENABLED\nVpcConfig: subnet-aaa, subnet-bbb (VPC attached)\nTracingConfig: Active\nPackage size: 52 MB (fat JAR, untrimmed)\nProvisionedConcurrency: 0\nMetrics (last 30 days):\n - Duration avg: 1800 ms, p95: 2400 ms\n - InitDuration avg: 3200 ms (cold start), p95: 4100 ms\n - Invocations: 8,000,000/month\n - ColdStarts: ~120,000/month (1.5% of invocations)\n - Errors: 0\nSLO: p95 end-to-end < 1000 ms\nEmit the standard optimization block (TARGET, VERDICT, REASON,\nRECOMMENDATION, ESTIMATED_LATENCY_IMPACT, MIGRATION_STEPS)."24 version: 0.1.025 author: Jacky Chan — AWS Community Builder26 keywords: Lambda, cold start, initialization time, InitDuration, provisioned concurrency, SnapStart, Java, power tuning, memory allocation, lazy initialization, connection pooling, VPC, hyperplane ENI, runtime selection, ARM64, Graviton, deployment package, Lambda Layers, Proguard, EFS mount, X-Ray overhead, Lambda Insights, runtime deprecation, latency optimization27 tags: lambda, compute, serverless, performance, cold-start, latency, snapstart, provisioned-concurrency28---2930# Lambda Cold Start Optimizer3132## What this skill does3334Translates a Lambda function's cold-start posture into a concrete35latency-optimization recommendation with a millisecond-denominated36estimated latency impact. The verdict is the highest-leverage action37across seven dimensions — memory allocation, provisioned concurrency,38SnapStart, init phase optimization, VPC cold start, runtime selection,39and deployment package size — applied in priority order. Always pairs40the recommendation with exact CLI commands (or Power Tuning invocation).4142## Quick navigation4344| Section | What it covers | When to jump here |45|---|---|---|46| Quick start | Four headline rules and the cold-start formula | First read |47| Mindset | Why SnapStart + provisioned concurrency are the heavy levers | Understanding the approach |48| Quick reference — verdict thresholds | Decision matrix at a glance | Classifying a function |49| Pre-flight data gate | CloudWatch metrics, Lambda Insights | Before any recommendation |50| Step 0 non-obvious behaviours | VPC hyperplane ENI, SnapStart Java-only, X-Ray overhead | Edge cases |51| Step 1 Memory allocation | Power Tuning for latency-optimal memory | The CPU-bound dimension |52| Step 2 Provisioned concurrency | Allocation, scheduling, autoscaling | Latency-sensitive APIs |53| Step 3 SnapStart (Java) | Init snapshot, versioned alias requirement | Java functions |54| Step 4 Init phase optimization | Lazy init, connection pooling, global scope | All runtimes |55| Step 5 VPC cold start | Hyperplane ENI elimination, when VPC still hurts | VPC-attached functions |56| Step 6 Runtime selection | Compiled vs interpreted, ARM64 Graviton | Architecture decisions |57| Step 7 Package size | Layers, Proguarded JARs, slim ZIPs | Large deployment packages |58| Step 8 Impact estimation | Latency math and worked examples | Every recommendation |59| Output format | VERDICT block + worked examples | Emitting the result |60| Anti-Patterns — NEVER | Common misclassifications | Self-check before emit |61| Pre-flight safety checks | CONFIRM gate, version publish, alias | Before any apply CLI |6263## Quick start6465- **SnapStart is the heaviest single lever for Java.** It eliminates66 the entire init phase (1-3 s for typical Spring/Java workloads) by67 restoring a pre-initialized snapshot. One-line config change, no code68 modification for most workloads. Available ONLY for Java (java21 and69 later supported runtimes).70- **Provisioned concurrency eliminates cold starts entirely — at a71 price.** It pre-initializes execution environments and keeps them72 warm. Use it ONLY for latency-critical paths (sync APIs, interactive73 endpoints) where a cold start violates the SLO. It charges for idle74 time; the cost-vs-latency trade-off must be explicit.75- **VPC cold start is largely solved (since 2019).** Hyperplane ENIs76 eliminated the 5-10 s VPC cold-start penalty. VPC-attached functions77 now see <100 ms overhead on cold starts. If a function still shows78 high VPC cold-start latency, check for ENI throttling or stale79 configuration, not the VPC itself.80- **The init phase is where most cold-start time lives.** Move SDK81 clients, DB connections, and heavy imports to global scope (outside82 the handler). Lambda reuses execution environments across invocations;83 global-scope init runs once per warm container, not per invocation.8485## Mindset8687Cold-start optimization is a latency-vs-cost decision, not a pure88utilization exercise. The goal is the memory/concurrency/runtime/package89configuration that minimizes cold-start InitDuration AND steady-state90Duration while preserving the cost envelope — not the absolute minimum91init time at any cost.9293Five-principle deep dive moved to `references/advanced-patterns.md` —94see "Mindset — five principles".9596## Quick reference — verdict thresholds9798| Observation (14-30 day window) | Verdict | Recommendation |99|---|---|---|100| Runtime = Java AND SnapStart NOT enabled AND InitDuration p95 > 1 s | **FURTHER_OPTIMIZATION_AVAILABLE** (SnapStart) | Step 3 — enable SnapStart, publish version |101| Latency-sensitive API (sync) AND cold-start p95 > SLO AND no provisioned concurrency | **FURTHER_OPTIMIZATION_AVAILABLE** (provisioned concurrency) | Step 2 — add provisioned concurrency sized to baseline |102| Memory < 1769 MB AND Duration scales with memory (CPU-bound) AND InitDuration > 500 ms | **FURTHER_OPTIMIZATION_AVAILABLE** (memory) | Step 1 — increase memory to Power Tuning latency optimum |103| SDK clients / DB connections initialized inside handler (per-invocation) | **FURTHER_OPTIMIZATION_AVAILABLE** (init phase) | Step 4 — move to global scope |104| Package size > 20 MB AND runtime = Java AND no Proguard/SnapStart | **FURTHER_OPTIMIZATION_AVAILABLE** (package) | Step 7 — trim fat JAR, enable Proguard |105| Architecture = x86_64 AND runtime is ARM-compatible AND latency-sensitive | **FURTHER_OPTIMIZATION_AVAILABLE** (architecture) | Step 6 — migrate to arm64 for better price-performance |106| Runtime is deprecated (e.g., nodejs16, java8) AND function is latency-sensitive | **FURTHER_OPTIMIZATION_AVAILABLE** (runtime) | Step 6 — upgrade to current runtime |107| TracingConfig = Active AND X-Ray overhead > 50 ms per invocation | **FURTHER_OPTIMIZATION_AVAILABLE** (tracing) | Step 0 — evaluate sampling rate |108| All dimensions verified AND cold-start p95 < SLO AND SnapStart enabled (Java) | **OPTIMIZED** | Emit post-state verification |109| InitDuration metrics absent (Lambda Insights not enabled) | **FURTHER_OPTIMIZATION_AVAILABLE** (observability) | Enable Lambda Insights for init-duration visibility |110| Observation window < 14 days | **NEED_MORE_INFO** | Pull 14-30 day CloudWatch data, re-evaluate |111112## Pre-flight: data gate (run before any optimization decision)113114Required data-source CLI listing moved to `references/diagnostic-commands.md`.115Full sequences: `references/cold-start-metrics-and-power-tuning.md`.116117### Data-quality short-circuits118119| Condition | Effect on optimization |120|---|---|121| `InitDuration` absent (Lambda Insights not enabled) | Enable Lambda Insights. Fall back to `Duration` spikes; mark confidence MEDIUM. |122| `Invocations` Sum = 0 over 14 days | Emit **OPTIMIZED** with note "dormant function." |123| Observation window < 14 days | **NEED_MORE_INFO**. Minimum 14 days; 30 days preferred. |124| Cold-start count absent | Estimate from ConcurrentExecutions + traffic-pattern analysis. Mark confidence MEDIUM. |125| Function `State != Active` | Skip optimization; surface as BLOCKED. |126| Runtime = java8 (legacy) | SnapStart not supported. Recommend runtime upgrade first (Step 6). |127128## Process — Optimization logic (apply in order)129130### Step 0: Non-obvious behaviours that change the recommendation131132Full gotcha catalog moved to `references/advanced-patterns.md` —133see "Step 0: Non-obvious behaviours".134135### Step 1: Memory allocation vs initialization time136137Latency-vs-memory curve, Power Tuning detail, and cost-latency note moved to138`references/advanced-patterns.md` (Step 1 deep dive).139140**Decision gate after Power Tuning (latency mode):**141142| Power Tuning `fastest` vs current MemorySize | Verdict | Action |143|---|---|---|144| `fastest` at higher memory AND InitDuration reduction > 500 ms | **FURTHER_OPTIMIZATION_AVAILABLE** (memory upsize) | Set MemorySize to `fastest`. Verify cost envelope. |145| `fastest` == current | No memory finding | Proceed to other dimensions. |146| `fastest` at lower memory (rare for cold start) | No finding — current is already latency-optimal | Proceed. |147148### Step 2: Provisioned concurrency (allocation, scheduling, autoscaling)149150Sizing CLI and scheduling detail moved to `references/worked-examples.md` and151`references/advanced-patterns.md` (Step 2 deep dive).152153**When provisioned concurrency is justified:**154155| Condition | Recommendation |156|---|---|157| Sync API (API Gateway, ALB, Function URL) AND cold-start p95 > SLO | Provisioned concurrency sized to p50-p75 of ConcurrentExecutions |158| Interactive endpoint (user-facing, <1 s SLO) AND cold starts visible | Provisioned concurrency with autoscaling |159| Async event-driven (SQS, Kinesis, EventBridge) | Do NOT use provisioned concurrency. Cold starts are absorbed by the queue/stream. |160| Batch job (rare invocations) | Do NOT use provisioned concurrency. Use on-demand. |161162### Step 3: SnapStart (Java only — initialization snapshot)163164SnapStart is the single highest-impact optimization for Java Lambda165functions. It takes a snapshot of the initialized JVM and restores it on166cold start, eliminating 1-3 s of JVM + framework init.167168**Eligibility:**169- Runtime: java21 (or later supported Java runtimes). SnapStart is170 supported on Corretto distributions.171- NOT available for: Node.js, Python, Go, Ruby, .NET.172- NOT available for: container-image functions (zip-only).173174Enablement CLI, expected-impact table, and caveats moved to175`references/advanced-patterns.md` (Step 3 deep dive).176177### Step 4: Init phase optimization (lazy initialization, connection pooling)178179Global-scope code pattern moved to `references/worked-examples.md`; runtime180connection-reuse table moved to `references/advanced-patterns.md`.181182**Init-phase checklist:**183184| Symptom | Fix |185|---|---|186| InitDuration > 500 ms (non-Java) | Move SDK clients, DB connections to global scope |187| InitDuration > 1 s (Java, no SnapStart) | Enable SnapStart (Step 3) |188| InitDuration spikes after deploy | Check for new heavy dependencies in import chain |189| DB connection per invocation | Use global connection pool with validity check |190| HTTP client per invocation | Use global HTTP client with keep-alive |191192### Step 5: VPC cold start penalty (hyperplane ENI elimination)193194VPC deep dive (key fact, failure modes, diagnostic CLI, thresholds) moved to195`references/advanced-patterns.md` + `references/diagnostic-commands.md`.196197### Step 6: Runtime selection (compiled vs interpreted, ARM64 Graviton)198199Init-speed-by-runtime table and ARM64 note moved to200`references/advanced-patterns.md` (Step 6 deep dive).201202**Recommendation framework:**203204| Current runtime | Recommendation |205|---|---|206| Java (no SnapStart) | Enable SnapStart (Step 3). If still slow, evaluate migration. |207| Java (SnapStart, still slow) | Init phase optimization (Step 4) + memory tuning (Step 1). |208| nodejs16 (deprecated) | Upgrade to nodejs20+. Deprecated runtimes miss optimizations. |209| java8 (deprecated) | Upgrade to java21. java8 does not support SnapStart. |210| python3.7 (deprecated) | Upgrade to python3.12. |211212### Step 7: Deployment package size reduction213214Package size correlates with init time. Lambda downloads, extracts, and215loads the deployment package on every cold start. Larger packages mean216longer init.217218**Package size thresholds:**219220| Package size | Impact | Recommendation |221|---|---|---|222| <5 MB | Negligible init overhead | No action |223| 5-20 MB | Moderate init overhead | Evaluate dependency trimming |224| 20-50 MB | Significant init overhead (100-500 ms) | Trim aggressively |225| >50 MB | Severe init overhead (500+ ms) | Refactor: Proguard, Layers, or container image |226227Proguard/JAR trimming, Node/Python trimming, and layer caution moved to228`references/advanced-patterns.md` (Step 7 deep dive).229230### Step 8: Impact estimation231232Compute the latency impact for each recommendation:233234```235current_cold_start_p95 = InitDuration_p95 + Duration_p95236projected_cold_start_p95 = projected_InitDuration_p95 + projected_Duration_p95237latency_reduction_ms = current_cold_start_p95 - projected_cold_start_p95238latency_reduction_pct = (latency_reduction_ms / current_cold_start_p95) × 100239```240241Always state assumptions: cold-start frequency (invocations per day242that are cold starts), InitDuration at current and projected memory243(from Power Tuning), SLO threshold, and whether SnapStart is enabled.244245## Configuration dependency graph246247```248 ┌─────────────────┐249 │ Runtime = Java? │250 └────────┬────────┘251 │252 ┌──────────┴──────────┐253 YES NO254 │ │255 ┌──────▼──────┐ ┌───────▼───────┐256 │ Enable │ │ Init phase │257 │ SnapStart │ │ optimization │258 │ (Step 3) │ │ (Step 4) │259 └──────┬──────┘ └───────┬───────┘260 │ │261 └──────────┬──────────┘262 │263 ┌────────▼────────┐264 │ Cold-start p95 │265 │ > SLO? │266 └────────┬────────┘267 │268 ┌──────────┴──────────┐269 YES NO270 │ │271 ┌──────▼──────┐ ┌───────▼───────┐272 │ Add prov. │ │ Check memory │273 │ concurrency │ │ + package + │274 │ (Step 2) │ │ runtime (1,7) │275 └─────────────┘ └───────────────┘276```277278Decision order: SnapStart (if Java) → init phase optimization →279provisioned concurrency (if latency-critical) → memory tuning →280runtime/package optimization.281282## Output format283284```text285TARGET: <function-name>286VERDICT: OPTIMIZED | FURTHER_OPTIMIZATION_AVAILABLE287REASON: <1-2 sentences naming the recommendation and the supporting data>288RECOMMENDATION:289 Current: <memory> MB, <runtime>, <architecture>, <SnapStart>, <provisioned concurrency>, <package size>290 Proposed: <memory> MB, <runtime>, <architecture>, <SnapStart>, <provisioned concurrency>, <package size>291 Dimensions changed: <memory | provisioned_concurrency | snapstart | init_phase | vpc | runtime | package>292 Dimensions checked: <list ALL seven, each ✓ (no finding) or → (finding)>293 Confidence: <HIGH/MEDIUM/LOW> — <one-line rationale>294ESTIMATED_LATENCY_IMPACT:295 Current cold-start p95: <ms> (InitDuration: <ms> + Duration: <ms>)296 Projected cold-start p95: <ms>297 Latency reduction: <ms> (<pct>%)298 SLO: p95 < <ms>299 Cold-start frequency: ~<count>/day (<pct>% of invocations)300MIGRATION_STEPS:301 1. <specific action with CLI command>302 2. <verification step>303CONFIRM: Before executing any state-changing CLI, emit and await operator304 approval: "CONFIRM: About to <action> on <function-name> in <region>.305 Proceed? (yes/no)"306```307308Full worked examples are in `references/worked-examples.md`.309310## STRICT output contract311312The rules below are hard constraints. Self-check EVERY emitted block313against these rules before returning the response. Do NOT substitute314markdown headings, camelCase, or bold variants for the literal labels.315316### FORBIDDEN output patterns3173181. **NEVER emit `VERDICT: FURTHER_OPTIMIZATION_AVAILABLE` with319 `Latency reduction: 0 ms`.** If every dimension nets zero latency320 delta, the verdict MUST be `OPTIMIZED`. A cost-only improvement is321 surfaced in REASON as a cost note, NOT as latency savings.3223232. **NEVER show latency math that does not balance.**324 `Current cold-start p95 − Projected cold-start p95` MUST equal325 `Latency reduction`, rounded to whole milliseconds.3263273. **NEVER emit scratch lines** ("WAIT — recompute", "Hmm, let me redo",328 "corrected:") in the output. Finalize the math before emitting.3293304. **NEVER recommend SnapStart for non-Java runtimes.** SnapStart is331 Java-only. Recommending it for Node.js, Python, or Go is a332 misclassification.3333345. **NEVER recommend SnapStart without warning about the versioned-alias335 requirement.** SnapStart requires published versions; `$LATEST` does336 not support it. The MIGRATION_STEPS MUST include `publish-version`.3373386. **NEVER omit a dimension from the RECOMMENDATION block.** The339 `Dimensions checked` line MUST list all seven dimensions, each marked340 ✓ (no finding) or → (finding).3413427. **NEVER attribute cold-start latency to VPC without verifying ENI343 health.** Since 2019, hyperplane ENIs reduced VPC cold start to344 <100 ms. If VPC latency is diagnosed, cite the specific ENI/subnet/SG345 evidence.3463478. **NEVER round intermediate formula steps differently from the final348 figure.** Compute at full precision, round only the displayed result.349350### Perfect example output — FURTHER_OPTIMIZATION_AVAILABLE with verified math351352Every field below is internally consistent. Copy this shape exactly.353354```text355TARGET: order-api-prod356VERDICT: FURTHER_OPTIMIZATION_AVAILABLE357REASON: Java 21 function with InitDuration p95 of 3200 ms and SnapStart358 NOT enabled. Enabling SnapStart eliminates 90% of init phase (snapshot359 restore drops InitDuration from 3200 ms to ~200 ms). Function is a360 sync API with cold-start p95 exceeding the 1000 ms SLO.361RECOMMENDATION:362 Current: 512 MB, java21, x86_64, SnapStart OFF, no PC, 52 MB363 Proposed: 512 MB, java21, x86_64, SnapStart ON, no PC, 52 MB364 Dimensions changed: snapstart (Step 3)365 Dimensions checked: memory ✓ provisioned_concurrency ✓ snapstart → (enable)366 init_phase ✓ vpc ✓ runtime ✓ package ✓367 Confidence: HIGH — SnapStart supported on java21; no container-image.368ESTIMATED_LATENCY_IMPACT:369 Current cold-start p95: 5000 ms (InitDuration: 3200 ms + Duration: 1800 ms)370 Projected cold-start p95: 2000 ms (InitDuration: 200 ms + Duration: 1800 ms)371 Latency reduction: 3000 ms (60%)372 SLO: p95 < 1000 ms — pair with provisioned concurrency for full SLO.373MIGRATION_STEPS:374 1. Enable SnapStart:375 aws lambda update-function-configuration --function-name order-api-prod376 --snap-start '{"ApplyOn":"PublishedVersions"}'377 2. Publish a version: aws lambda publish-version --function-name order-api-prod378 3. Update alias: aws lambda update-alias --function-name order-api-prod379 --name prod --function-version <new-version>380 4. Verify: aws lambda get-function-configuration --function-name order-api-prod381 --qualifier <new-version> --query 'SnapStart.OptimizationStatus'382 5. Monitor InitDuration for 7 days. If SLO unmet, add provisioned concurrency.383CONFIRM: About to enable SnapStart on order-api-prod (publish version,384 update alias). Projected cold-start reduction: 3000 ms (60%). Proceed?385```386387**Self-check before emit:**388- [ ] `Current cold-start p95 − Projected cold-start p95 == Latency reduction`?389- [ ] All seven dimensions listed in `Dimensions checked`?390- [ ] Every `→` dimension has a corresponding MIGRATION_STEPS entry?391- [ ] SnapStart recommendation includes `publish-version` step?392- [ ] No scratch/recompute text in the block?393394## Verdict semantics395396| Verdict | When to emit |397|---|---|398| `FURTHER_OPTIMIZATION_AVAILABLE` | At least one dimension has a concrete, latency-reducing recommendation. |399| `OPTIMIZED` | All dimensions pass (SnapStart enabled for Java, init optimized, cold-start p95 < SLO, no remaining levers). |400| `NEED_MORE_INFO` | Data gate failed: InitDuration metrics absent, window < 14 days, or Lambda Insights not enabled with no fallback. |401| `BLOCKED` | Hard precondition prevents evaluation: function State != Active, IAM denies lambda:GetFunction, runtime deprecated and blocks all optimizations. |402403**Zero-latency-impact rule:** If latency reduction == 0 ms for every404dimension, verdict MUST be `OPTIMIZED`, never405`FURTHER_OPTIMIZATION_AVAILABLE`. Exception: a cost-only improvement406(without latency change) is surfaced in REASON as a cost note, not as407latency savings.408409## Anti-Patterns — NEVER (top 5)4104111. **NEVER recommend SnapStart for non-Java runtimes.** SnapStart is412 Java-only (java21+). Recommending it for Node.js, Python, Go, or413 Ruby is a fundamental misclassification.4144152. **NEVER enable provisioned concurrency without verifying that the416 function is latency-critical (sync API, interactive endpoint).**417 Provisioned concurrency for async/event-driven workloads is pure418 waste — cold starts are absorbed by the queue or stream.4194203. **NEVER attribute cold-start latency to VPC without verifying ENI421 health.** Since 2019, hyperplane ENIs reduced VPC cold start to422 <100 ms. Diagnosing "VPC cold start" without checking ENI/subnet/SG423 is a false positive.4244254. **NEVER recommend a memory increase for cold-start optimization426 without citing Power Tuning latency data.** Memory increases cost;427 the latency improvement must be measured, not assumed.4284295. **NEVER enable SnapStart without warning about the versioned-alias430 requirement and network-connection reset.** SnapStart requires431 published versions and resets TCP connections on restore. Missing432 these caveats causes production failures.433434Extended anti-patterns in `references/error-handling-and-edge-cases.md`.435436## Expert heuristic437438Full heuristic text moved to `references/advanced-patterns.md` —439see "Expert heuristic".440441## Pre-flight safety checks (run before any remediation CLI)442443- **MANDATORY CONFIRMATION GATE.** Before any state-changing operation,444 emit and await operator approval.445- **Publish a version before enabling SnapStart.** SnapStart applies to446 published versions, not `$LATEST`.447- **Test SnapStart before cutover.** Network connections reset on448 restore; verify DB reconnection logic.449- **Verify provisioned concurrency cost envelope.** Idle charges must be450 justified by the latency SLO.451- **Test memory changes via staging alias.** Higher memory increases452 cost; verify latency improvement justifies.453- **SnapStart + DB connections.** Ensure connection validity checks454 (lazy reconnect) are in place.455- **Provisioned concurrency removal causes cold starts.** Verify SLO456 tolerates cold starts.457- **Power Tuning invokes the function.** Ensure idempotency.458- **Bulk-operation limit:** 5 functions per batch, sorted by estimated459 latency impact.460461## Recent AWS features (2024-2026)462463Feature list moved to `references/advanced-patterns.md` —464see "Recent AWS features (2024-2026)".465466## References467468- `references/cold-start-metrics-and-power-tuning.md` — Power Tuning469 deployment (latency mode), Lambda Insights metrics, memory-to-CPU470 mapping, SnapStart CLI sequences, ARM64 matrix, package thresholds.471- `references/worked-examples.md` — SnapStart enablement, provisioned472 concurrency sizing, init phase refactor, memory tuning, already-473 optimal, NEED_MORE_INFO, end-to-end walkthrough.474475## References (load on demand)476477- [advanced-patterns.md](references/advanced-patterns.md) — mindset principles,478 Step 0 gotchas, per-step deep dives (memory curve, SnapStart, VPC, runtime,479 package), expert heuristic, recent AWS features.480- [diagnostic-commands.md](references/diagnostic-commands.md) — pre-flight481 data-gate CLI listing, VPC/ENI and subnet diagnostics.482483## Domain484485AWS CloudOps / Lambda Serverless Cold-Start Latency Optimization.486487## AWS documentation488489- **AWS Lambda Developer Guide** — https://docs.aws.amazon.com/lambda/latest/dg/welcome.html490- **Lambda SnapStart** — https://docs.aws.amazon.com/lambda/latest/dg/configuration-snapstart.html491- **Lambda provisioned concurrency** — https://docs.aws.amazon.com/lambda/latest/dg/configuration-concurrency.html492- **Lambda VPC networking** — https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html493- **Lambda memory configuration** — https://docs.aws.amazon.com/lambda/latest/dg/configuration-memory.html494- **Lambda runtime deprecation** — https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html495- **CloudWatch Lambda Insights** — https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Lambda-Insights.html496- **AWS Lambda Power Tuning (OSS)** — https://github.com/alexcasalboni/aws-lambda-power-tuning497- **AWS CLI Lambda reference** — https://docs.aws.amazon.com/cli/latest/reference/lambda/498- **Well-Architected — Performance Efficiency** — https://docs.aws.amazon.com/wellarchitected/latest/performance-efficiency-pillar/welcome.html