FinBank receives multi-page PDF invoices (3–10 pages each) in an S3 bucket and needs to extract structured key/value fields (InvoiceNumber, InvoiceDate, InvoiceTotal) and persist the results to DynamoDB. Several teams tried DetectDocumentText but the key/value pairing is unreliable. What is the most appropriate Textract approach and configuration to reliably extract structured form fields at scale in this AWS environment?
Choose an answer
Tap an option to check your answer.
Correct answer: Use asynchronous StartDocumentAnalysis with FeatureTypes set to ['FORMS'] on the S3 PDFs; parse KEY_VALUE_SET blocks and their RELATIONSHIPS from the job results, then map keys to values and write the structured fields to DynamoDB. Ensure the Textract service role can read the S3 input and write job results to the output location if used..
Why this is the answer
The correct approach leverages StartDocumentAnalysis with FORMS feature type, which is designed for extracting structured key/value pairs from documents like invoices. Since the invoices are multi-page and processing needs to be at scale, the asynchronous StartDocumentAnalysis is appropriate. Parsing KEYVALUESET blocks and their RELATIONSHIPS allows for accurate mapping of keys to their corresponding values. The service role permissions are crucial for Textract to access S3. Synchronous AnalyzeDocument is not suitable for multi-page documents at scale and TABLES feature type is for tabular data, not key/value pairs. Amazon Comprehend's DetectEntities is for general entity recognition, not structured key/value extraction from forms. AnalyzeExpense is a specialized API for expense receipts, not general invoices, and may not cover all required fields or be the most cost-effective for this specific use case.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed