Amazon Textract Results Notification - Amazon Textract

Amazon Textract Results Notification

Amazon Textract sends the status of an analysis request to an Amazon Simple Notification Service (Amazon SNS) topic. To get the notification from an Amazon SNS topic, use an Amazon SQS queue or an AWS Lambda function. For more information, see Calling Amazon Textract Asynchronous Operations. For an example, see Detecting or Analyzing Text in a Multipage Document.

The status message sent by Amazon Simple Notification Service to Amazon SQS has the following JSON format:

{ "JobId": "String", "Status": "String", "API": "String", "JobTag": "String", "Timestamp": Number, "DocumentLocation": { "S3ObjectName": "String", "S3Bucket": "String" } }

This table describes the different parameters within an Amazon SNS status.

Parameter Description

JobId

The unique identifier that Amazon Textract assigns to the job. It matches a job identifier that's returned from a Start operation, such as StartDocumentTextDetection.

Status

The status of the job. Valid values are Succeeded, Failed, or Error.

API

The Amazon Textract operation used to analyze the input document, such as StartDocumentTextDetection or StartDocumentAnalysis.

JobTag

The user-specified identifier for the job. You specify JobTag in a call to the Start operation, such as StartDocumentTextDetection.

Timestamp

The Unix timestamp that indicates when the job finished, returned in milliseconds.

DocumentLocation

Details about the document that was processed. Includes the file name and the Amazon S3 bucket that the file is stored in.

If the value of "Status" in the Amazon SNS notification is "Failed", this indicates something has gone wrong with your analysis job. In this case, check for an error message returned by the Amazon Textract API operation and ensure your document matches the quotas specified bySet Quotas in Amazon Textract