| Published | 22/07/2026 |
| Platform | AWS Study Group |
| Link | https://www.facebook.com/photo?fbid=4664462010543491&set=gm.2221408125290814&idorvanity=660548818043427 |
| Evidence | ![]() |
Hello everyone!
I am currently learning about services available on the AWS cloud platform. Today, I would like to introduce an interesting service designed to solve document digitization and automated document-processing problems: Amazon Textract.
In many systems, important data still exists in PDF files, scanned forms, invoices, receipts, medical records, and photographs of physical documents. Humans can read these documents relatively easily, but transferring their information into software often requires manual data entry or traditional optical character recognition tools.
Amazon Textract helps automate this process by using machine learning to identify both the text and the structure of a document.
Amazon Textract is an AWS machine learning service that automatically extracts:
The main difference between Amazon Textract and traditional OCR is that Textract does more than return a raw stream of characters.
A traditional OCR system might return:
Invoice Number: INV-2026-001
Invoice Date: 21/07/2026
Total: 1,250.00
Amazon Textract can go further by identifying the relationships between those elements:
Invoice Number → INV-2026-001
Invoice Date → 21/07/2026
Total → 1,250.00
Textract also returns the location of detected data through geometry information such as BoundingBox and Polygon. An application can therefore determine exactly where a word, table cell, or field appeared in the original document.
The difference can be illustrated through two workflows.
Document
↓
Character recognition
↓
Raw text
↓
Custom parsing logic
↓
Structured data
Document
↓
Text and layout detection
↓
Table, form, and relationship analysis
↓
Structured data with coordinates and confidence
With traditional OCR, developers often need to write regular expressions, position-based logic, or custom rules for every document template.
When a form changes its layout, those rules may stop working correctly.
Amazon Textract uses pretrained machine learning models to recognize document structures, reducing the number of template-specific rules that an application needs to maintain.
Textract can detect individual words and lines of text in a document.
The response includes more than the detected characters. It can also contain:
A simplified response block can look like this:
{
"BlockType": "WORD",
"Text": "Invoice",
"Confidence": 99.7,
"Geometry": {
"BoundingBox": {
"Width": 0.08,
"Height": 0.02,
"Left": 0.10,
"Top": 0.12
}
}
}
Geometry information allows an application to highlight extracted content on the source document, create a review interface, or associate text with a specific region of a page.
Information in a form is frequently organized as key-value pairs.
For example:
| Key | Value |
|---|---|
| Full Name | Nguyen Van A |
| Date of Birth | 01/01/2000 |
| Customer ID | CUS-00125 |
Textract can identify the relationship between a label and its corresponding value.
This is useful for processing:
Textract can identify:
For example, it can reconstruct data from a PDF table:
| Product | Quantity | Price |
|---|---|---|
| Keyboard | 2 | 50.00 |
| Mouse | 4 | 20.00 |
This is an important capability because tables are often difficult to process with traditional OCR. A raw text response might preserve the characters but lose the relationship between rows and columns.
The Layout feature identifies semantic elements within a document, including:
This allows an application to reconstruct the reading order and logical structure of the document instead of receiving only a disconnected list of words.
Queries allow an application to ask specific questions about a document.
Instead of extracting all text and searching for the required information, a developer can submit questions such as:
What is the invoice number?
What is the total amount?
Who is the customer?
When is the payment due?
Textract returns:
For example:
{
"Query": "What is the total amount?",
"Answer": "$1,250.00",
"Confidence": 98.4
}
Queries are particularly useful when an application needs only a limited set of fields and does not want to build a complete document-parsing system.
At present, Query detection is available only for English-language documents.
Textract provides a specialized API for analyzing invoices and receipts.
The service can identify common fields such as:
Fields can be normalized into common names, allowing an application to process invoice formats from multiple vendors without creating parsing rules for every template.
In addition to general document-analysis APIs, Textract provides specialized APIs for certain document categories.
AnalyzeID is designed to extract information from supported identity documents, including US driver’s licenses and passports.
AnalyzeLending supports the classification and extraction of data from mortgage-related document packages.
Specialized APIs can reduce the amount of post-processing required, but their supported document types and geographic scope can be narrower than those of the general OCR APIs.
Textract provides more than raw text. Its response can contain:
This can significantly reduce the amount of code required to transform OCR output into usable data.
In a traditional workflow, an employee may have to open each document and manually enter information into another system.
Textract makes it possible to automate this process:
Upload document
↓
Analyze with Textract
↓
Evaluate confidence
↓
Normalize data
↓
Store in database
Human reviewers can focus on fields with low confidence or documents that do not meet the expected quality requirements.
Textract can be integrated with other AWS services.
A document-processing architecture might include:
Amazon S3
↓
AWS Lambda
↓
Amazon Textract
↓
Amazon DynamoDB
↓
Amazon OpenSearch Service or an internal application
When a user uploads a document to Amazon S3, a Lambda function can automatically start an analysis job.
The results can then be normalized and stored in a database or indexed by a search system.
Textract is managed by AWS, so developers do not need to deploy or operate their own OCR server fleet.
The system can process a small number of documents or scale to larger document-processing workflows, provided that the application follows service quotas and implements appropriate retry, queueing, and rate-control mechanisms.
Textract provides both synchronous and asynchronous APIs. Asynchronous operations are generally more appropriate for multipage PDF or TIFF documents.
Textract does not require purchasing an OCR software license or operating a dedicated compute cluster.
Cost depends on factors such as:
Text detection, forms, tables, and queries can have different pricing dimensions. Cost should therefore be estimated using the actual document types and page volume of the project.
Financial institutions process many types of documents, including:
Textract can extract important information such as:
The extracted data can be passed to an automated review or validation workflow.
In healthcare, Textract can support the digitization of:
The service can reduce manual data entry, although the overall system must still implement suitable data-protection, access-control, and compliance measures.
Government organizations can use automated document processing for:
Transforming paper-based information into structured data can improve searchability and reduce document-processing time.
Insurance organizations can use Textract to process:
Fields with high confidence can be processed automatically, while uncertain fields can be sent to a human reviewer.
Textract can help extract data from:
OCR output should not be treated as a hiring decision. The service should only be used to support document digitization and data organization.
A basic Textract workflow can include the following steps:
Document
↓
Amazon S3
↓
Amazon Textract
↓
Raw JSON response
↓
Post-processing
↓
Structured business data
Community feedback can provide useful practical perspectives, but it should not be treated as an official accuracy benchmark. Textract performance depends heavily on the document type, image quality, and required output structure.
Some users report good results with PDF documents and table extraction.
The ability to return document structure, coordinates, and relationships between table cells makes Textract more useful than systems that return only raw text.
Textract is designed for common structured document types such as:
Specialized APIs can reduce the amount of custom parsing required for common fields.
Textract integrates naturally with Amazon S3, AWS Lambda, AWS Step Functions, Amazon SNS, Amazon SQS, and Amazon DynamoDB.
This is useful when building an event-driven document-processing pipeline.
Textract represents its results as a collection of Block objects.
A block can represent:
Blocks are connected using IDs and Relationships.
For multipage documents, responses can become large and difficult to use directly. Developers often need a post-processing layer to:
Textract provides document-analysis results, but it does not automatically transform every document into a complete business-data model.
OCR results can degrade when a document is:
AWS recommends using high-quality input images, ideally around 150 DPI or higher.
Even with good input, an application should use the returned Confidence values to determine which fields can be processed automatically and which fields require human review.
OCR cannot guarantee perfect accuracy.
Characters with similar shapes can be confused:
0 ↔ O
1 ↔ I ↔ l
5 ↔ S
8 ↔ B
Spacing, punctuation, currency symbols, and number formatting can also be misread in low-quality documents.
Important fields such as account numbers, invoice numbers, and monetary values should therefore be validated.
This is a significant limitation for projects in Vietnam.
Amazon Textract currently supports text detection for:
Vietnamese is not included in the officially supported language list.
Textract also does not return the detected document language in its response.
Query detection is currently available only for English-language documents. Some specialized APIs are also limited to particular document types or markets.
Textract is therefore not an appropriate choice for a Vietnamese OCR workflow that requires high accuracy and official AWS language support.
Textract returns confidence scores, but the application must determine which threshold is acceptable.
For example:
Confidence ≥ 98% → Accept automatically
90%–98% → Apply additional validation
< 90% → Send for human review
The appropriate thresholds should be established by testing the service against the project’s own documents. One threshold should not be assumed to work for every field or document type.
Usage-based pricing is convenient for initial adoption, but cost can increase when the system processes millions of pages.
Before deploying to production, a team should estimate:
A large language model can help process Textract output by:
A possible architecture is:
Document
↓
Amazon Textract
↓
Extracted text and structure
↓
Validation and business rules
↓
LLM
↓
Normalized output
However, a large Textract JSON response should not be passed directly to an LLM without preparation.
The application should:
Textract is responsible for reading the document. An LLM can help interpret or normalize the output, but it should not replace validation.
Amazon Textract is a good fit when:
Textract might not be suitable when:
Amazon Textract is a powerful AWS OCR and document-analysis service.
It does more than transform images into raw text. It can identify:
Textract is particularly suitable for projects that need to process large volumes of English-language documents, PDFs, tables, invoices, or forms within the AWS ecosystem.
However, developers should be prepared to post-process the JSON response, evaluate confidence scores, and handle low-quality documents.
A major limitation for projects in Vietnam is that Textract does not currently provide official support for Vietnamese. Queries are also limited to English-language documents.
Before adopting Textract, a team should test it with a representative set of project documents and evaluate:
Textract can handle document reading and structural analysis. A complete document-processing system still requires validation, business rules, monitoring, and human review.