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?

feita há 2 anos320 visualizações
1 Resposta
1
Resposta aceita

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
ESPECIALISTA
respondido há 2 anos
  • Aah excellent, that solved the problem! Thank you so much

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas