Textract AnalyseId not working / available on Lambda

0

Is it possible that the new Textract AnalyzeID function is not available in Lambda yet? In both Lambda and SAM I get this error:

Textract.analyzeID is not a function
const AWS = require('aws-sdk');
const Textract = new AWS.Textract();

exports.handler = async (event, context) => {
      Textract.analyzeID(params, function(err, data) {
        ...
      });
};

When I run the similar code in an empty project locally it works, making me wondering if its something to do with the Lambda/SAM container?

질문됨 2년 전320회 조회
1개 답변
1
수락된 답변

I suspect that you are using an older version of the AWS SDK that doesn't have the function you're trying to use. Make sure your Lambda function is packaged with an appropriate AWS SDK version. You can find some instructions here: https://aws.amazon.com/premiumsupport/knowledge-center/lambda-layer-aws-sdk-latest-version/

profile pictureAWS
전문가
답변함 2년 전
  • Aah excellent, that solved the problem! Thank you so much

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠