The current documentation doesn't fully explain how Lambda resolves handler paths when they don't exactly match the file structure.
Missing Documentation: Lambda appears to have fallback logic in handler resolution that isn't documented. When a handler is configured as lib/handler.run but the file exists at /var/task/handler.js, Lambda successfully finds and executes the handler despite the path mismatch.
Evidence:
- Handler config:
lib/handler.run
- File location:
/var/task/handler.js
- Result: Function works
- Node.js test:
require.resolve("lib/handler") fails
Request: Please add documentation explaining:
- Lambda's complete handler resolution algorithm
- Any fallback mechanisms used when exact paths aren't found
- Whether this behavior is guaranteed across runtime versions
Suggested Location: This information would fit well in the "Define Lambda function handler in Node.js" documentation section.
The current documentation doesn't fully explain how Lambda resolves handler paths when they don't exactly match the file structure.
Missing Documentation: Lambda appears to have fallback logic in handler resolution that isn't documented. When a handler is configured as
lib/handler.runbut the file exists at/var/task/handler.js, Lambda successfully finds and executes the handler despite the path mismatch.Evidence:
lib/handler.run/var/task/handler.jsrequire.resolve("lib/handler")failsRequest: Please add documentation explaining:
Suggested Location: This information would fit well in the "Define Lambda function handler in Node.js" documentation section.