When using the SDK on AWS Lambda with Node.js 22, the following error occurs:
Calling the invoke API action failed with this message: Failed to execute 'decode' on 'TextDecoder': parameter 1 is not of type 'ArrayBuffer'
Node.js version: 22
Runtime: AWS Lambda
SDK version: 0.71.2
Package: @anthropic-ai/sdk
Workaround : downgrade the Lambda runtime to Node.js 20.
When using the SDK on AWS Lambda with Node.js 22, the following error occurs:
Calling the invoke API action failed with this message: Failed to execute 'decode' on 'TextDecoder': parameter 1 is not of type 'ArrayBuffer'Node.js version:
22Runtime:
AWS LambdaSDK version: 0.71.2
Package:
@anthropic-ai/sdkWorkaround : downgrade the Lambda runtime to Node.js 20.