Runtime.HandlerNotFound AWS Origin: Platform & cloud Last updated 12 Oct 2026

Runtime.HandlerNotFound: index.handler is undefined or not exported

Lambda loaded the file but couldn’t find the function named in the handler setting.

Exact message you may see is undefined or not exportedHandler 'handler' missing on module
Seen on: AWS

Meaning

The handler setting is file.exportedFunction (Node) or module.function (Python). Renamed functions, default exports, TypeScript compiled to another folder, or ESM files (.mjs) referenced as .js cause it.

Common causes

  • Handler setting doesn’t match file or function name
  • Function not exported (Node: exports.handler / export const handler)
  • Compiled output in dist/ but handler points at the root
  • Default export instead of named export

⚡ Quick fix

  1. Set the handler to <file>.<export> exactly
  2. Export the function with the expected name
  3. Point the handler at the compiled path (dist/index.handler)

Detailed fix by platform

Node.js

  1. javascript
    export const handler = async (event) => {
      return { statusCode: 200, body: "ok" };
    };   // handler setting: index.handler

How to diagnose

  1. Setting — Runtime settings → Handler
  2. Export — Name exported by the file
  3. Path — File location in the zip

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Platform & cloud. Errors that are often confused with or caused by this one (click to open):

1000 — Cloudflare Error 1000: DNS points to prohibited IP (Cloudflare)10001046 — MySQL ERROR 1046 (3D000): No database selected (MySQL)10461049 — MySQL ERROR 1049 (42000): Unknown database 'x' (MySQL)10491153 — MySQL ERROR 1153 (08S01): Got a packet bigger than 'max_allowed_packet' bytes (MySQL)11533D000 — FATAL: database "x" does not exist (PostgreSQL)3D000413 — HTTP 413 Content Too Large (Request Entity Too Large) (HTTP)413AADSTS90002 — AADSTS90002: Tenant 'x' not found (Azure)AADSTS90002AH00558 — Apache: AH00558: apache2: Could not reliably determine the server's fully qualified domain name (Nginx / Apache)AH00558Runtime.H…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.