While implementing aws textract Analyse Expense asynchronous api using boto3 for python, I'm getting error as
'Textract' object has no attribute 'start_expense_analysis'.
on the other hand, start_document_text_detection is working fine for me in the same environment.
Code:
def startAnalyseJob(s3BucketName, objectName):
textract = boto3.client('textract')
response = textract.start_expense_analysis(
DocumentLocation={
'S3Object': {
'Bucket': s3BucketName,
'Name': objectName
}
})
return response["JobId"]
jobId = startAnalyseJob(bucket, key)
Error:
[ERROR] AttributeError: 'Textract' object has no attribute 'start_expense_analysis'