aws_sdk version 3 syntax not working after updation of runtime to node18.x

58 Views Asked by At

I was previously using node14.x and aws-sdk version 2 on my aws lambda setup. Currently I have updated my node runtime to node18.x in my serverless.yml file. After that I have tested with all the features I have in my code base , everything was working perfectly fine. And then when moved to aws-sdk 3 syntax like moving const { S3 } = require('aws-sdk') to const { S3 } = require('@aws-sdk/client-s3) after I am facing issues that the module not found. Node version- 18.16.0 serverless version - 2.59.0

I have also tried with adding the aws-sdk's required packages in package.json itself.

0

There are 0 best solutions below