Skip to main content

Amazon Textract

Pretrained document text extraction and analysis: text detection, forms and tables, Queries and Custom Queries, AnalyzeExpense for invoices and receipts, AnalyzeID for identity documents, lending workflows, synchronous and asynchronous processing with S3 and SNS, security, and cost.

4 min read · Last reviewed · SAA-C03

Loading your progress

Sign in to bookmark tutorials and track what you have read.

On this page

What it is

Amazon Textract is a pretrained document analysis service. It extracts printed and handwritten text from scanned documents and images and, beyond plain OCR, understands document structure: forms (key-value pairs), tables, and specific fields. It works with financial reports, medical records, tax forms, invoices, receipts, and identity documents. No ML (Machine learning)Software that learns patterns from example data to make predictions or decisions, instead of following rules written by hand. A model is first trained on data, then used to make predictions on new data, which is called inference.Glossary entry expertise is needed.

Choose Textract when a question asks to extract text or data from documents, such as scanned PDFs, forms, invoices, or IDs, to replace manual data entry. For text in everyday photos, such as street signs, Amazon Rekognition also works. To understand the meaning of the extracted text, such as sentiment or entities, pass it to Amazon Comprehend.

APIs

API What it extracts
DetectDocumentText Lines and words of text
AnalyzeDocument Text plus forms (key-value pairs), tables, signatures, and answers to Queries
Queries (a feature of AnalyzeDocument) Ask in plain language for the field you need, such as "What is the policy number?". Custom Queries adapt the pretrained feature to your own documents
AnalyzeExpense Fields from invoices and receipts, such as vendor, total, and line items
AnalyzeID Fields from identity documents issued by the U.S. government, such as driver licenses and passports
Analyze Lending Classifies the pages of mortgage loan packages and routes each page to the right analysis

Synchronous or asynchronous

  • Synchronous operations process single-page documents (JPEG, PNG, PDF, TIFF) with near real-time responses. They suit interactive apps.
  • Asynchronous operations process multipage PDF and TIFF documents stored in Amazon S3:
    1. Call a Start operation, such as StartDocumentAnalysis.
    2. Textract publishes the completion status to an Amazon SNS topic, which an SQS queue or a Lambda function can read.
    3. Get the results with the matching Get operation.

A common serverless pattern: a document lands in S3, an S3 event invokes Lambda, Lambda starts an asynchronous Textract job, the SNS notification triggers a second step that stores the results in DynamoDB or S3, and Comprehend analyzes the text.

Security, resilience, performance, and cost

Security

  • IAM controls access to the API (Application programming interface)A defined way for one program to ask another for data or actions, such as a set of HTTPS requests and responses. Every AWS service is controlled through its API, which the console, the CLI, and the SDKs call for you.Glossary entry and to the S3 documents Textract reads.
  • Input documents in S3 are protected with S3 SSE (Server-side encryption)Encryption that a service applies when it stores your data and removes when you read it back. Amazon S3 encrypts every new object with SSE-S3 by default; SSE-KMS uses keys in AWS KMS instead.Glossary entry (S3-managed keys or KMS keys); traffic uses TLS (Transport Layer Security)The protocol that encrypts traffic between a client and a server and lets the server prove its identity with a certificate. It replaced SSL, though the older name is still common; HTTPS is HTTP over TLS.Glossary entry.
  • Interface VPC endpointA private connection from a VPC to an AWS service or another endpoint service without crossing the internet. Gateway endpoints, for Amazon S3 and DynamoDB, are route table targets; interface endpoints are network interfaces that use AWS PrivateLink.Glossary entry (AWS PrivateLink) keep calls off the internet. CloudTrail records API calls.

Resilience and performance

  • Textract is a managed, Regional service. Use the asynchronous APIs with SNS and SQS for large or bursty volumes, and retry ThrottlingLimiting how many requests a client can make in a period. A throttled request is rejected, often with HTTP status 429 or a throttling error, and should be retried later with backoff.Glossary entry requests with backoff.

Cost

  • Pay per page processed. The price depends on the API and features used: plain text detection costs less than forms, tables, or queries.

Monitoring

  • CloudWatch metrics for successful requests, errors, and throttling; CloudTrail for auditing.

Textract or another option?

If the requirement is Choose
Extract text, forms, and tables from scanned documents Amazon Textract
Pull totals and line items from invoices or receipts Textract AnalyzeExpense
Read fields from driver licenses or passports Textract AnalyzeID
Detect text in photos of scenes Amazon Rekognition
Find sentiment, entities, or PII (Personally identifiable information)Information that can identify a person, alone or combined with other data, such as a name, email address, or passport number. Amazon Macie finds PII in Amazon S3.Glossary entry in the extracted text Amazon Comprehend
Turn speech into text Amazon Transcribe

Reverse mindmap: when the question points here

Is it Amazon Textract?
  • Yes, when the question says
    • Extract text from scanned documents or PDFs leads to Textract
    • Replace manual data entry from forms leads to Textract forms
    • Keep the structure of tables leads to Textract tables
    • Ask for a specific field in plain language leads to Textract Queries
    • Invoices and receipts leads to AnalyzeExpense
    • Driver licenses and passports leads to AnalyzeID
  • Know how it runs
    • Single page, real time leads to Synchronous API
    • Multipage PDF in S3 leads to Asynchronous API, completion to SNS
  • No, when the question says
    • Text on a street sign in a photo leads to Rekognition
    • Meaning or sentiment of text leads to Comprehend

Key takeaways

  • Textract extracts printed and handwritten text from documents, plus forms, tables, and specific fields.
  • AnalyzeDocument covers forms, tables, and Queries; AnalyzeExpense covers invoices and receipts; AnalyzeID covers U.S. identity documents.
  • Synchronous APIs handle single pages in near real time; asynchronous APIs handle multipage documents in S3, with completion published to SNS.
  • It is priced per page, depending on the features used; combine it with Comprehend to analyze the text.

Sources

Check your understanding

Loading your quiz progress

Sign in to check your understanding with 5 questions on Amazon Textract.

Glossary Install the app

LetMeMaster is an independent educational project and is not affiliated with or endorsed by Amazon Web Services. Practice results do not predict actual exam outcomes.

© 2026 LetMeMaster. All rights reserved. Content may not be copied or redistributed without permission.

Proudly made in Canada

Add LetMeMaster to your Home Screen

  1. Tap the Share button in your browser's toolbar. In Safari it is at the bottom of the screen, or at the top on iPad.
  2. Scroll down and tap Add to Home Screen.
  3. Tap Add. Open LetMeMaster from its icon on your Home Screen.