0

I am working on an AWS Lambda where I need to use AWS Textract, for this, I have used AWS-SDK, with AWS-SDK I was able to import s3, but AWS Textract is not working, when I deploy and test it shows,

Unable to import module 'src/functions/routes/handler': Error

I think it has something to do with packaging, like may be It is not packaging the relevant file, but not sure and I don't know how to make it package if it is the problem, any suggestions are appreciated.

gokublack
  • 1,260
  • 2
  • 15
  • 36
  • Your question will not be answered if you do not provide the code for people to review and respond to. Include the code body directly in your question, or add a link to a runnable repo if possible. – Kim Gentes Aug 12 '19 at 14:42

1 Answers1

0

Since you have not given any code to go on, I will consider the possibility that you have properly written your import code and this error is a valid response to an issue. In that case, you should note that there are issues with importing Textract in Lambda via the aws-sdk. See this reported issue:

https://github.com/aws/aws-sdk-js/issues/2728

For a thorough and thoughtful example of using Textract with a Lambda service, consider this excellent article posted with complete details:

https://medium.com/@sumindaniro/aws-textract-with-lambda-walkthrough-ed4473aedd9d

Kim Gentes
  • 1,496
  • 1
  • 18
  • 38