Skip to content

[FEEDBACK REQUEST] Should AWS Lambda deprecate callback-style function handlers for Node.js 24 and later? #137

Open
@maxday

Description

@maxday

👍 👎 The AWS Lambda Runtimes team would love your thoughts! Please upvote/downvote to indicate if you support this change.

Currently, AWS Lambda supports both callback-style and async/await function handler signatures. Considering Node.js has fully embraced async/await, we are considering removing support for callback style function handlers starting with our Node.js 24 release later this year. With this change, customers currently using the callback signature will need to update their code to use the async/await signature when migrating their functions to Node.js 24 or later runtimes.

This proposal applies to Node.js 24 and later runtimes only. We will continue to support both callback and async/await function handler signatures in our existing Node.js 18, Node.js 20, and Node.js 22 runtimes.

Current callback-style: (to be removed)

exports.handler = (event, context, callback) => {
  // ... handler logic
  callback(null, { statusCode: 200, body: 'Success!' });
};

Async/await style: (to be kept as-is)

export const handler = async (event, context) => {
  // ... handler logic
  return { statusCode: 200, body: 'Success!' };
};

Should we make this change? Please vote!
👍 : Yes, in favor of deprecating the callback handler signature.
👎 : No, keep the callback handler signature.

Please also share any feedback in the comments.

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