Lesson 2 of 4 Enterprise Integration Architectures

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.

True or false

Wrapping legacy systems

Exam skills 2.3.1

Check three claims about integrating legacy systems with GenAI applications.

Log in to try this activity Interactive activities are free with an account.

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.

PatternFreshnessTools
Change data captureSecondsDynamoDB Streams, Kinesis, Amazon MSK
Scheduled exportHoursAWS Glue, Amazon AppFlow, EventBridge Scheduler
File transferMinutes to hoursAWS DataSync, AWS Transfer Family
API facadeReal time on requestAPI Gateway, Lambda, VPC link

The following diagram shows one integration pattern for each kind of enterprise data, chosen by how the data changes.

Matching integration patterns to how data changes. Product availability is volatile, so an agent tool calls a REST facade, API Gateway with a Lambda adapter, that reaches the on-premises ERP's SOAP API over private connectivity. Product descriptions change weekly, so DataSync copies them to S3 and a knowledge base syncs them.
Private connectivity can be AWS Direct Connect or a Site-to-Site VPN.
Scenario questions

Keeping GenAI data current

Exam skills 2.3.1 · 1.4.5

Choose the synchronisation pattern for each source.

Log in to try this activity Interactive activities are free with an account.
Worked example

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.

Check yourself

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.