Skip to main content
Welcome back, Solutions Architects.
This is Michael Forrester.
In this lesson we’ll explore Amazon Textract — a fully managed machine learning service that automatically extracts printed and handwritten text and structured data from scanned documents. Textract converts document content (images, PDFs, handwritten notes) into machine-readable output you can use for analytics, search, or downstream processing. What Textract extracts:
  • Plain text (printed and handwritten)
  • Key-value pairs (form extraction)
  • Tables (with cell relationships)
  • Signatures (presence and location)
  • Structured JSON output you can transform into CSV, TXT, or any application-specific format
Textract returns detailed JSON results describing detected text, forms, and tables. You can post-process those JSON results to produce CSV, plain text, or other formats for storage, analytics, or downstream services.
A slide titled "Document Extraction – Categories" showing four colored icons labeled Text Extraction, Form Extraction, Table Extraction, and Signatures. The icons represent different types of data extraction from documents.
Key capabilities and operational notes Operational highlights
  • Integration: Commonly paired with Amazon S3, AWS Lambda, Amazon Comprehend, and Amazon DynamoDB to build an end-to-end pipeline.
  • Scalability: Use asynchronous APIs (Start/Get job pattern) for multi-page or high-volume workloads to avoid Lambda timeouts.
  • Compliance: Textract is HIPAA-eligible. Use encryption at rest (S3), secure IAM roles (least privilege), and VPC endpoints as needed.
I’ve used Textract on poor handwriting and found it produced usable results with limited manual correction. Pairing Textract output with NLP (Amazon Comprehend or custom models) improves entity extraction and PII detection. Common architecture pattern
  1. Documents are uploaded to Amazon S3.
  2. An S3 event triggers an AWS Lambda function.
  3. The Lambda function calls Amazon Textract (synchronous for quick single-page jobs; asynchronous for multi-page or large batches).
  4. Textract returns structured JSON. The Lambda stores JSON in S3, indexes parsed fields into DynamoDB, or forwards extracted text to Amazon Comprehend for NLP.
You can run Textract from the console for quick experiments (upload an image or PDF and inspect the JSON), or embed it in serverless pipelines for automated, high-volume processing.
An architecture diagram titled "Textract" showing data flow from Amazon S3 to AWS Lambda to Amazon Textract and then to Amazon DynamoDB. Each AWS service is represented by its icon and connected with arrows.
Quick examples
  • Synchronous (single image / quick test) — AWS CLI:
  • Asynchronous (multi-page PDF / batch processing) — start job and then get results:
Sample (simplified) JSON output structure
Practical tips and best practices
  • Use asynchronous APIs for large or multi-page documents to avoid Lambda time limits.
  • Persist Textract JSON to S3 for auditing, replayability, and long-term storage.
  • Store parsed key fields (IDs, dates, totals) in DynamoDB for fast queries and indexing.
  • Combine Textract output with Amazon Comprehend or custom NLP models to extract entities, detect PII, or perform sentiment analysis.
  • Secure the pipeline: enable S3 encryption, enforce IAM least-privilege, and consider VPC endpoints for private access.
When processing sensitive data (PII or PHI), ensure your AWS account and pipeline meet compliance requirements. Use encryption, strict IAM policies, and logging/monitoring to maintain an audit trail.
Recommended integrations and references
  • Amazon S3 — storage for source documents and Textract output
  • AWS Lambda — orchestration and lightweight processing
  • Amazon DynamoDB — fast lookup and indexing of parsed fields
  • Amazon Comprehend — NLP for entity extraction, PII detection, and sentiment
  • AWS Identity and Access Management (IAM) — secure permissions for Textract and downstream services
Additional resources That’s AWS Textract — a managed, scalable solution for extracting text and structured data from documents and turning them into usable digital information. Michael Forrester — catch us on Slack if you have any questions.

Watch Video