0

I am writing some lambda's and In those lambda's I am using aws sdk to use some of the services, It's working fine for some service and it's not working for some services, in some services it say's module initialization error. What is wrong here, why some aws sdk modules only throw this error?

the error log from watch log:

START RequestId: dcbf2a88-d723-4a4e-8be9-896887150169 Version: $LATEST
module initialization error: TypeError
    at Object.<anonymous> (/var/task/src/functions/routes/handler.js:4:18)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
END RequestId: dcbf2a88-d723-4a4e-8be9-896887150169
REPORT RequestId: dcbf2a88-d723-4a4e-8be9-896887150169  Duration: 38.90 ms  Billed Duration: 100 ms     Memory Size: 1024 MB    Max Memory Used: 69 MB

line number 4 in the error is object creation code

const text = new AWS.Textract({apiVersion: '2018-06-27'});
5
  • Hi, can you at least show us the code which throws the error? Commented Jun 19, 2019 at 6:20
  • Hi @kkesley, updated the post Commented Jun 19, 2019 at 7:58
  • You might want to look at similar threads and questions. Commented Jun 19, 2019 at 8:03
  • I checked those links, it didn't work Commented Jun 19, 2019 at 8:16
  • what's in handler.js line 4? can you show us your code? Commented Jun 19, 2019 at 9:26

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.