When CloudWatch triggers the lambda function, the following error occurs:
2022-07-26T15:01:37.913Z INFO connected to Logsene
2022-07-26T15:01:38.584Z ERROR (node:9) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
Issue seems related to the latest version of the Node buffer module introducing a new API and the Buffer() function and new Buffer() constructor are deprecated:
https://www.npmjs.com/package/buffer
The safe-buffer module is a drop-in replacement for the buffer module and may resolve the issue:
https://www.npmjs.com/package/safe-buffer
Node.js documentation:
Porting to the Buffer.from() / Buffer.alloc() API
When CloudWatch triggers the lambda function, the following error occurs:
Issue seems related to the latest version of the Node
buffermodule introducing a new API and theBuffer()function andnew Buffer()constructor are deprecated:https://www.npmjs.com/package/buffer
The
safe-buffermodule is a drop-in replacement for thebuffermodule and may resolve the issue:https://www.npmjs.com/package/safe-buffer
Node.js documentation:
Porting to the Buffer.from() / Buffer.alloc() API