AI Cloud Architect

Build interactive PDF text extraction from Amazon S3

AWSHow-to by Phani Parcha and Saibal GoshAWS Artificial Intelligence Blog

In this post, you’ll build a server that extracts text from PDF files in Amazon S3 in real time. This protocol-based approach provides programmatic document access. You’ll walk through the architecture, set up the server, and run interactive document queries. Along the way, you’ll compare this approach with Amazon Textract so you can decide which tool fits your workload.

Read the original (opens the source's page in a new tab)

AI: Summary

What it is

A walkthrough builds an MCP server that lets an AI assistant pull text from text-based PDFs in S3 in real time, with no OCR.

Who it is for

Developers and proof-of-concept teams who want an AI assistant to query PDFs in S3 without batch pipelines or Textract.

Key points

  • Handles only text-based PDFs; no OCR, forms, tables or layout reconstruction, which the post routes to Amazon Textract.
  • Post estimates about $2.50/month for the MCP approach versus about $23 to $28 with Textract for 10,000 pages; figures are illustrative.
  • Setup uses Python 3.10+, boto3, PyPDF2, mcp and Kiro CLI, with read-only S3 IAM permissions.