- Symptom
- errorType Runtime.CallbackHandlerDeprecated in CloudWatch, invocation returns FunctionError UnhandledInit log warning: AWS Lambda plans to remove support for callback-based function handlers starting with Node.js 24Handler written as (event, context, callback) worked on nodejs22.x
- Cause
- The Node.js 24 runtime dropped the handler form that takes a third callback argument. Older runtimes still accept it, so the break appears only on the runtime upgrade.
- Fix
- Make the handler async and return the result or throw the error. If the callback parameter is declared but never used, just remove it from the signature.
- Apply
// before export const handler = (event, context, callback) => { callback(null, { statusCode: 200, body: 'ok' }); }; // after export const handler = async (event, context) => { return { statusCode: 200, body: 'ok' }; };- Affected
- Lambda nodejs24.x and later, since Node.js 24 became available in Lambda in November 2025; nodejs22.x and earlier unaffected
- Sources
Last verified 2026-10-15 · Confirmed by 0 builders