The modernization of administrative workflows has reached a critical milestone with the development of a fully automated Intelligent Document Processing (IDP) system deployed on Amazon Web Services (AWS). Designed to handle complex Freedom of Information (FOI) and Subject Access Requests (SAR) for Irish citizens, this system addresses the logistical challenge of querying large-scale insurance claims databases. By integrating advanced machine learning, optical character recognition (OCR), and generative artificial intelligence, the implementation has demonstrated a 90% increase in efficiency compared to traditional manual processing methods.
The Evolution of Document Processing in the Insurance Sector
For decades, the insurance industry has been burdened by the manual handling of physical and digital documentation. In Ireland, the General Data Protection Regulation (GDPR) grants citizens the right to access their personal data, including information stored within insurance databases. Fulfilling these requests historically required human operators to manually verify identification documents—such as passports, driving licenses, and bank statements—and cross-reference them with internal records.

The introduction of this IDP system represents a paradigm shift. By leveraging the AWS cloud platform, the system automates the ingestion, classification, and extraction of Personally Identifiable Information (PII). This transition not only accelerates the response time for citizens but also significantly reduces the margin for human error in data entry and verification.
Technical Architecture and Core AWS Components
The IDP system is built upon a modular architecture that utilizes several key AWS services to create a seamless pipeline. Each component is chosen for its scalability, security, and ability to handle unstructured data.
1. Secure Credential Management
The process begins with the secure acquisition of data. Using AWS Secrets Manager, the system stores OAuth credentials and refresh tokens required to access corporate email accounts. This ensures that sensitive authentication data is never hard-coded and is rotated according to security best practices.

2. Data Ingestion and Storage
Amazon S3 (Simple Storage Service) serves as the primary data lake. The workflow utilizes five distinct folders to manage the lifecycle of a document:
- Raw: For initial image uploads.
- Textract: For storing JSON outputs from the OCR process.
- Results: For the final PII extraction data.
- Checkpoints: To track processing states.
- Duplicates/Invalid: For error handling and data hygiene.
3. Serverless Compute and Orchestration
AWS Lambda functions provide the logic for each stage of the pipeline. These functions are orchestrated by AWS Step Functions, a serverless workflow engine that manages retries, error handling, and the sequence of operations. This orchestration is vital for maintaining the integrity of the data as it moves through the system.
Chronology of the IDP Workflow
The automated pipeline follows a strict chronological sequence to ensure that every document is accounted for and processed accurately.

Phase I: Ingestion and Validation
The process is triggered on a scheduled basis, typically via an Amazon EventBridge cron job. The first Lambda function, ingest_email_image, polls the designated email server. It identifies emails with specific labels and validates that the attachments are in supported formats (JPG or PNG). Valid images are transferred to the S3 "raw" folder, while duplicates or invalid files are shunted to a separate directory for manual review.
Phase II: Optical Character Recognition (OCR)
Once the raw image is stored, the extract_text Lambda invokes Amazon Textract. Unlike standard OCR, Textract uses machine learning to understand the layout and structure of the document. It extracts not just the raw text, but also the relationships between data points, providing a structured JSON output that includes confidence scores for every line of text detected.
Phase III: AI-Driven Classification and Extraction
The most advanced stage of the pipeline involves the classify_and_extract_pii Lambda. This function passes the Textract output to Amazon Bedrock, specifically utilizing the Claude Sonnet 4.6 model. The Large Language Model (LLM) performs two critical tasks:

- Classification: Identifying whether the document is a passport, driving license, or bank statement.
- Semantic Extraction: Finding the specific PII required—First Name, Last Name, Date of Birth, and Address—even if the document layout varies significantly.
Phase IV: Final Output and Human-in-the-Loop (HIL)
The final output is a structured JSON file stored in the S3 "results" folder. While the system is 90% more efficient than manual processing, a Human-in-the-Loop (HIL) step remains a critical safeguard. Users perform a final cross-check to ensure the extracted PII matches the internal database records before a formal response is sent to the citizen.
Comparative Analysis: Manual vs. Automated Processing
Data collected during the implementation phase highlights a stark contrast between the old and new regimes. Manual processing of a single request, including document verification and data entry, could take an average of 15 to 30 minutes of active human labor. The automated IDP system completes the technical extraction in under 60 seconds.
| Feature | Manual System | Automated IDP System |
|---|---|---|
| Processing Speed | 15–30 minutes per document | < 1 minute per document |
| Accuracy | Prone to human transcription errors | High (Model confidence + HIL check) |
| Scalability | Limited by staff hours | Virtually unlimited (Cloud-native) |
| Operational Cost | High (Labor intensive) | Low (Pay-per-use AWS resources) |
| Compliance | Harder to audit | Full audit trail via AWS CloudWatch |
The 90% efficiency gain reported by the developers stems not only from the speed of the AI but from the elimination of "dead time" between tasks. By using Step Functions to chain Lambdas, the system moves from one stage to the next without waiting for human intervention.

Security and Privacy Considerations
Handling PII requires a "Security by Design" approach. Within this AWS implementation, several layers of protection are active:
- IAM Roles: Each Lambda function operates under the Principle of Least Privilege, with permissions strictly limited to the specific S3 buckets and AI models required for its task.
- Encryption: Data is encrypted at rest using AWS Key Management Service (KMS) and in transit via TLS.
- Data Minimization: The system is designed to extract only the specific fields necessary for the request, discarding extraneous information contained in the documents.
Broader Impact and Industry Implications
The successful deployment of this system has broader implications for the public sector and the financial services industry. As regulatory requirements around data privacy become more stringent, the ability to process citizen requests quickly and accurately becomes a competitive necessity rather than a luxury.
Industry analysts suggest that the use of Generative AI (GenAI) in document processing is the "second wave" of digital transformation. While the first wave focused on digitizing paper, this second wave focuses on "understanding" the digital content. By using models like Claude Sonnet 4.6 via Amazon Bedrock, organizations can now handle "noisy" data—such as low-quality scans or handwritten notes—that would have broken traditional rule-based OCR systems.

Future Development and Production Readiness
While the current system provides a robust framework, the developers have outlined several steps required to move from a successful implementation to a global production-ready environment:
- CI/CD Integration: Utilizing AWS CodePipeline to automate deployments and updates.
- Enhanced Monitoring: Implementing comprehensive Amazon CloudWatch dashboards to track model performance and extraction accuracy over time.
- Advanced Error Handling: Developing more sophisticated "Dead Letter Queues" (DLQ) to handle edge cases where the AI might fail to classify a document.
- Multi-Region Deployment: Ensuring high availability by deploying the stack across multiple AWS regions to safeguard against localized outages.
Summary of Findings
The implementation of an automated IDP system on AWS demonstrates that the integration of cloud-native services and generative AI can resolve long-standing bottlenecks in data administration. By automating the extraction of PII for insurance claim requests, the system has achieved a 90% efficiency gain, providing a blueprint for other organizations facing similar regulatory and logistical challenges.
The project highlights the maturity of the AWS ecosystem, where services like Textract, Bedrock, and Step Functions can be orchestrated to perform tasks that previously required significant human cognitive effort. As the insurance industry continues to evolve, the adoption of such intelligent pipelines will likely become the standard for managing the vast quantities of data that define the modern digital economy.



