Just a heads up - while AWS Lambda now supports Node.js 24 (default), this code does not work with Node.js 24 - I downgraded to Node.js 22, and then it worked.
ERROR Init Error {"errorType":"Runtime.CallbackHandlerDeprecated","errorMessage":"ERROR: AWS Lambda has removed support for callback-based function handlers starting with Node.js 24. You need to modify this function to use a supported handler signature to use Node.js 24 or later. For more information see https://docs.aws.amazon.com/lambda/latest/dg/nodejs-handler.html .","name":"Runtime.CallbackHandlerDeprecated"

Just a heads up - while AWS Lambda now supports Node.js 24 (default), this code does not work with Node.js 24 - I downgraded to Node.js 22, and then it worked.
ERROR Init Error {"errorType":"Runtime.CallbackHandlerDeprecated","errorMessage":"ERROR: AWS Lambda has removed support for callback-based function handlers starting with Node.js 24. You need to modify this function to use a supported handler signature to use Node.js 24 or later. For more information see https://docs.aws.amazon.com/lambda/latest/dg/nodejs-handler.html .","name":"Runtime.CallbackHandlerDeprecated"