How would you investigate suppressed initialization after a Lambda invocation failure?
Instruction: A fictional standard Lambda invocation crashes. For the next invocation, START-to-END is 1.80 seconds but REPORT Duration is 2.45 seconds, with no separate Init Duration field. Explain a possible cause and the evidence needed before concluding.
Updated
Worked answer
A possible explanation is suppressed initialization: after an invocation failure, Lambda may reset the environment and run initialization again before handling the next request. The REPORT duration can include that work without a separate visible initialization field.
The difference is 0.65 seconds, but subtraction alone does not prove the cause. Correlate the request and log stream, confirm the preceding failure, and inspect Telemetry API initialization events with phase=invoke. Check runtime and extension timing and whether the log fields use comparable boundaries.
Measure startup work separately from handler and downstream spans. Make initialization repeatable and revalidate cached clients or files; reset does not guarantee an empty /tmp. Test the failed invocation's side effects too, because retrying after a crash must not repeat a completed external operation.
Sources
Lambda reset and suppressed initialization; Telemetry API. The 0.65-second calculation uses fictional practice inputs.