Runtime.HandlerNotFound: index.handler is undefined or not exported
Lambda loaded the file but couldn’t find the function named in the handler setting.
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
- 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
🧠 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.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 7 Oct 2026