Skip to content

Documentation Lambda handler resolution fallback mechanism for Node.js runtime #483

@ibaraki-douji

Description

@ibaraki-douji

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:

  1. Lambda's complete handler resolution algorithm
  2. Any fallback mechanisms used when exact paths aren't found
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions