FREE TOOL

Lambda Error Decoder

Paste a Lambda error or log line - Task timed out, Runtime.ImportModuleError, Runtime.HandlerNotFound, signal: killed, Runtime.ExitError - and get its causes and fixes for Node.js, Python, Java, .NET, Ruby or Go.

  • Your data never leaves your browser: everything is calculated by JavaScript on this page, not on a server.
  • Nothing you enter is uploaded, processed on a server or stored. Check it in your browser's developer tools (Network tab).
  • Once the page has loaded, the tool works without an internet connection.

Lambda error or log line

The error from the console's test result or the Invoke response, lines from the function's log group (include the REPORT line), or a deployment error. The function's ARN or log group in it fills in the commands. It is read here and never leaves your browser.

Or pick an error

The errors the decoder recognizes, as Lambda and the runtimes print them.

See diagnosis ↓
Lambda timeouts, memory, packaging and concurrency are AWS Developer Associate topicsTry free DVA-C02 practice questions with answers and explanations.DVA-C02 questions →

Where Lambda errors appear

An execution environment goes through two phases you see errors from. Init loads the runtime, your code and its dependencies and runs everything outside the handler, at most 10 seconds. Invoke runs the handler for one event, at most the function's timeout. What fails where:

PhaseWhat fails there
DeploymentA package over 50 MB uploaded directly or 250 MB unzipped, code storage, environment variables over 4 KB
Start of the processRuntime.InvalidEntrypoint: no bootstrap, a binary for another architecture, a container ENTRYPOINT Lambda cannot run
InitRuntime.ImportModuleError, Runtime.HandlerNotFound, Runtime.UserCodeSyntaxError, an uncaught exception in the code outside the handler, the Init phase's 10 seconds
InvokeTask timed out, out of memory (signal: killed), a full /tmp, Runtime.ExitError, and every error your code throws
Before the function runsTooManyRequestsException (throttled), a payload over the limit, a KMS key Lambda cannot use to decrypt the environment variables

A synchronous caller - the console's Test button, aws lambda invoke, API Gateway - gets a function error back with status 200 and the header X-Amz-Function-Error; the body holds errorType and errorMessage. Asynchronous invocations and event sources retry it and send it to a dead-letter queue or failure destination if you set one. Either way the whole story is in the log group /aws/lambda/FUNCTION_NAME: aws logs tail /aws/lambda/FUNCTION_NAME --since 1h prints it.

Read the REPORT line

After every invocation Lambda writes one REPORT line to the log. Paste it with the error - the decoder reads it, and a line whose memory used reached the memory size is an out-of-memory kill even when no error says so.

FieldWhat it tells you
DurationHow long the handler ran. Close to the timeout on every invocation: raise the timeout or find the slow call
Billed DurationWhat you pay for, rounded up to the millisecond
Memory Size / Max Memory UsedThe memory setting and the peak of this environment so far. Equal: the process ran out of memory
Init DurationOnly on the first invocation of an environment - a cold start - and how long Init took
Status / Error TypeWhen the line has them, whether the invocation ended in a timeout or an error, and which

The limits behind the errors

LimitValueError when exceeded
Timeout3 seconds by default, 900 at mostTask timed out after N seconds
Init phase10 seconds, then repeated within the timeoutINIT_REPORT ... Status: timeout
Memory128 to 10,240 MB (one vCPU at 1,769 MB)Runtime exited with error: signal: killed
/tmp512 to 10,240 MBNo space left on device
Payload6 MB request and 6 MB response synchronous, 200 MB streamed, 1 MB asynchronousRequestEntityTooLargeException
Deployment package50 MB zipped uploaded directly, 250 MB unzipped with layers, 10 GB container imageUnzipped size must be smaller than 262144000 bytes
Concurrency1,000 per Region by default, shared by all functionsTooManyRequestsException: Rate Exceeded

Frequently asked questions

Is the error sent anywhere?

No. It is read in your browser: nothing you paste is uploaded, processed on a server or stored. The page only counts that the decoder was used and which kind of error it recognized, never the text.

Why does it work locally and fail in Lambda?

Lambda runs on Amazon Linux, from the files in your package only, with a read-only file system outside /tmp. A dependency installed globally on your machine, a package compiled for macOS or Windows, a file written next to the code or a call that needs the internet from a VPC without a NAT gateway all work on a laptop and fail there.

Does more memory cost more?

Per millisecond, yes, but memory brings CPU with it: a function that runs twice as fast with twice the memory costs the same. Raising the memory is often the cheapest fix for timeouts as well as out-of-memory errors.

Why does the error say the timeout, not how long the work took?

Lambda stops the invocation when the timeout runs out, so Task timed out after 3.00 seconds only says the function had 3 seconds. Log the time before and after each call to an outside service to find which one is slow.

References

Troubleshoot invocation issues in Lambda
Troubleshoot execution issues in Lambda
Troubleshoot deployment issues in Lambda
Lambda quotas
Understanding the Lambda execution environment lifecycle