Runtime.HandlerNotFound: index.handler is undefined or not exported
Lambda loaded the file but couldn’t find the function named in the handler setting.
is undefined or not exportedHandler 'handler' missing on module 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
- Set the handler to <file>.<export> exactly
- Export the function with the expected name
- Point the handler at the compiled path (dist/index.handler)
Detailed fix by platform
Node.js
- javascript
export const handler = async (event) => { return { statusCode: 200, body: "ok" }; }; // handler setting: index.handler
How to diagnose
- Setting — Runtime settings → Handler
- Export — Name exported by the file
- 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:
Similar errors
Most viewed in AWS
Other ways to find it
Where this error sits
Origin: Platform & cloud. Errors that are often confused with or caused by this one (click to open):
🧠 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.
Report a correction or suggest an improvement
Last updated 12 Oct 2026