2 réponses
- Le plus récent
- Le plus de votes
- La plupart des commentaires
0
Please refer to a sample of Lambda function using Textract : https://docs.aws.amazon.com/textract/latest/dg/lambda.html
in its simplest form, it should look like this :
import boto3
import json
import os
def lambda_handler(event, context):
print(event)
# Get the service resource
textract = boto3.client('textract')
# Call Amazon Textract
response = textract.detect_document_text(
Document={
'S3Object': {
'Bucket': os.environ['BUCKET_NAME'],
'Name': event['Records'][0]['s3']['object']['key']
}
})
# Print detected text
print(response)
return response
répondu il y a 10 mois
Contenus pertinents
- demandé il y a 2 mois
- demandé il y a un an
- demandé il y a 6 mois
- AWS OFFICIELA mis à jour il y a 10 mois
- AWS OFFICIELA mis à jour il y a 3 ans
- AWS OFFICIELA mis à jour il y a un an
- AWS OFFICIELA mis à jour il y a 3 ans
Ignore the post. I fixed it.