Integrating Legacy Systems and Synchronizing Their Data
This lesson covers API-based integration and data synchronisation patterns that let generative AI applications read from and write to mainframes, on-premises databases and other legacy systems safely and keep knowledge in sync.
Learning outcomes
After completing this lesson, you will be able to:
- Wrap legacy capabilities in modern APIs.
- Synchronize data with change data capture and scheduled extracts.
API-based integration with legacy systems
A common approach wraps legacy capabilities in modern APIs. API Gateway fronts a Lambda function or a container that speaks the legacy protocol (for example SOAP, a database driver or a message format), or uses a private integration through a VPC link to reach a service running in a VPC. Agents and applications then call clean REST APIs with OpenAPI definitions, and the adapter handles translation, authentication and error mapping. This is also how legacy functions become agent tools or MCP tools through AgentCore Gateway.
In the other direction, legacy systems that can call HTTP endpoints or drop files can trigger generative AI processing: files dropped through AWS Transfer Family (SFTP) land in S3 and emit events, and messages on existing queues can be bridged with EventBridge Pipes or Amazon MSK connectors.
Wrapping legacy systems
Data synchronisation patterns
Generative AI applications need current data from systems of record, either as knowledge for RAG or as context for prompts. Change data capture (CDC) streams changes as they happen: DynamoDB Streams for DynamoDB tables, or database change streams captured into Kinesis or Amazon MSK for relational databases. A consumer re-renders changed records as documents and updates the knowledge base with direct ingestion.
Scheduled synchronisation exports data periodically with AWS Glue jobs or Amazon AppFlow (for SaaS sources), or copies files with AWS DataSync from on-premises file systems. The choice depends on how fresh the data must be and what the source supports. Write-back from AI to systems of record goes through the system's API with validation, never directly to its database.
The following table summarises the patterns.
| Pattern | Freshness | Tools |
|---|---|---|
| Change data capture | Seconds | DynamoDB Streams, Kinesis, Amazon MSK |
| Scheduled export | Hours | AWS Glue, Amazon AppFlow, EventBridge Scheduler |
| File transfer | Minutes to hours | AWS DataSync, AWS Transfer Family |
| API facade | Real time on request | API Gateway, Lambda, VPC link |
The following diagram shows one integration pattern for each kind of enterprise data, chosen by how the data changes.

Keeping GenAI data current
Product data from an on-premises ERP
A sales assistant must answer with current product availability from an on-premises ERP that exposes a SOAP API, and with product descriptions that change weekly in a file share.
Availability is volatile and must be real time, so an agent tool calls a REST facade (API Gateway with a Lambda adapter reaching the ERP over private connectivity). Descriptions change slowly, so DataSync copies them to S3 weekly and a knowledge base syncs them. Each kind of data uses the pattern that matches its freshness.
Which service brings files from an SFTP feed into AWS for a knowledge base?
Show answer
AWS Transfer Family.
Exam Tips
Remember for the exam
- Wrap legacy protocols in REST APIs with adapters; reuse them as agent tools.
- Real-time knowledge updates: change data capture with direct ingestion.
- SaaS exports: AppFlow. On-premises files: DataSync. SFTP feeds: Transfer Family.
- Write back to systems of record through their APIs, not their databases.