sasitha.dev
Download CV
← All projectsProject 04 / 07
Client · Digital transformation

Cloud-native document processing pipeline

A self-service platform and event-driven document pipeline that brought online submission to a client whose core system could not offer it — integrating with the legacy system rather than replacing it, and later extended with AI-based checks without disturbing the existing flow.

Type
Client project
Timeline
2024 — 2026
Stack
React · TypeScript · Step Functions · ECS Fargate · Lambda · DynamoDB · Amazon Bedrock

The problem

An enterprise client processed applications that depended on supporting documents. Their core system was a large legacy back-office application: expensive to replace, and difficult to extend with a web channel. As a result, documents arrived on paper — slowing processing down and giving processing teams poor visibility of where each application stood.

The challenge was to give applicants a modern online experience while keeping the legacy system as the system of record.

The approach

A cloud-native platform with a React self-service portal in front of an event-driven document pipeline on AWS. The new platform acts as the digital front door; the legacy system continues to do the processing.

Document capture

Applicants sign in with RealMe, complete their application in the React portal, and upload supporting documents as PDFs and images.

Uploads go directly to Amazon S3 through presigned URLs, and every file is scanned for malware with Amazon GuardDuty before it is processed. Application data reaches the portal through a serverless REST API on API Gateway and Lambda, backed by DynamoDB. Because the processing pipeline is decoupled from the API, high application volumes do not affect the portal’s responsiveness.

Delivery to the legacy system

Each upload triggers an event-driven workflow orchestrated by AWS Step Functions. Processing runs as a series of ECS Fargate tasks: documents are watermarked, packaged into archives and delivered to the client’s internal system over FTP. The details of each delivery are recorded in DynamoDB, so every submission can be traced from upload to hand-off.

AI-based document checks

As R&D on top of the capture pipeline, we built AI-based checks of the submitted documents on Amazon Bedrock, using multiple Anthropic models — for example, confirming that a document has been signed and that the supporting documents match what the application requires.

Because the pipeline was already event-driven, the AI workflow could run fully decoupled from document capture and delivery. It plugged into the existing events without changing or disrupting the flow that was already in production.

What I learned

Key decisions

Decision

Front the legacy system instead of replacing it

The client’s core system could not provide a web channel. A new platform captures applications and documents online, then packages and delivers them to the legacy system in a form it already accepts.

Trade-off: The platform is bound by the legacy system’s interface — documents are delivered as packaged files over FTP rather than through an API.
Decision

Direct-to-S3 uploads with presigned URLs

Applicants upload documents straight to S3 using presigned URLs, so large files never pass through the API and its responsiveness is unaffected by upload volume.

Trade-off: Files reach storage before they are inspected, so every upload has to be scanned for malware before any further processing.
Decision

Orchestrated processing stages

Step Functions coordinates the pipeline, with each stage — watermarking, packaging and delivery — running as its own Fargate task, so stages can be monitored and retried independently.

Trade-off: More moving parts to maintain: a state machine, several task definitions and the hand-offs between them.
Next project →RAG evaluation framework