The challenge
Our client builds software for managing legal proceedings, including cases, hearings, arbitrations and evidence. Law firms, courts and dispute resolution bodies use it to turn large volumes of unstructured documents into searchable, organised evidence, so strict access control and document integrity are essential.
Its existing ingestion setup could not keep up. One platform ran on EC2 as a monolith and processed documents one after another; a newer cloud system could not cope with large collections and gave little insight into its failures.
- Volume. Legal teams needed to upload up to 10,000 documents at once, often just before hearings, and the sequential model struggled under that load.
- Large files. Documents of 2 to 3 GB failed unpredictably, with no visibility into why.
- Mixed formats. PDF, Word, Excel, PowerPoint, email, zip and media files were processed inconsistently, and non-compliant or encrypted PDFs caused errors late in the workflow.
- No status. Users could not see where their documents were in the pipeline.
- Slow, risky change. Tight coupling to the monolith and poor documentation made every improvement slow and high-risk.
- A greenfield build. DevOps, service templates and cloud provisioning had to be set up from scratch, across six programming languages.
Our solution
We started with discovery and architecture work, mapping the existing ingestion flows and defining a cloud-native target state. We then built a new document uploader that sits alongside the client's existing platform, accepts files in any format, normalises them to PDF, adds searchable text and delivers structured output back to that platform.
Scalable cloud-native architecture
AWS Step Functions orchestrates 23 independent microservices running on EKS, each fronted by SQS queues for load levelling. SQS message group IDs are set to the tenant ID, so no single customer can monopolise processing. Hundreds or thousands of files can be in flight at the same time, and burst uploads of 10,000+ documents are absorbed.
Multi-format document processing
Dedicated services classify and route every file type, including emails with nested attachments and zip archives. Aspose.Total converts Office documents to PDF with parallel workers for files of up to 20,000 pages, and corrupted PDFs are validated and repaired. AWS Textract adds a hidden searchable text layer using coordinate mapping, so scanned images become searchable too.
Secure multi-tenant infrastructure
- Isolation. Per-tenant S3 buckets and customer-managed KMS keys are provisioned at runtime from Cognito tenant IDs.
- Malware scanning. Every upload passes through a GuardDuty-monitored staging bucket before it enters the pipeline.
- Audit. Events stream to CloudWatch, S3 and DynamoDB, with a 90-day retention for in-app display.
- Safe cutover. LaunchDarkly feature flags switch between the new and legacy pipelines with zero downtime.
AI-accelerated delivery
We worked within the client's AI development lifecycle framework using a proof-of-concept-first approach: prototype a service, generate a vision document from it, then rebuild it for production with Claude Enterprise. One Claude session built each service while a second acted as an independent judge, reviewing quality without changing the code. Requirements lived as markdown in GitHub, and bi-weekly demos replaced traditional sprints. Engineers reviewed and approved all AI-generated code, only enterprise AI accounts were used, and credentials, client data and production configuration never went into prompts.
Business impact
- 10,000+ documents at once. Sequential processing gave way to simultaneous processing with real-time status for users.
- Larger files. Supported file size grew from about 1 GB, unreliably, to 2 to 3 GB per document, more than a threefold improvement.
- Every common format. PDF, Office files, email with nested attachments, zip and media are all handled.
- Low-risk releases. An independent pipeline with feature-flag cutover replaced changes to the monolith.
- Quality built in. AI produced 5,000+ unit tests across six languages; design gap analysis found 33 bugs, and over 150 bugs were fixed during a two-week UAT phase.
- Fast, reversible infrastructure. AI-generated Terraform provisions 73 AWS resources in a one-hour, fully reversible deployment.
Conclusion
The client now has a production-ready, cloud-native document pipeline that replaces its legacy ingestion engine, scales to the largest case uploads and supports the full range of file types legal teams work with. It also provides the secure, observable foundation for the client's next generation of AI-powered legal features, and shows what a small team can deliver when AI is built into every stage of software delivery.