Automate Oracle PL/SQL to PostgreSQL migration with Amazon Bedrock and Strands Agents
Database Blog
This article describes an automated solution for migrating Oracle PL/SQL code to PostgreSQL using Amazon Bedrock and the Strands Agents framework.
- Uses Claude Sonnet 4.6 on Amazon Bedrock to convert complex PL/SQL procedures, functions, and triggers to PL/pgSQL
- Integrates AWS DMS Schema Conversion assessment CSV to identify unconverted objects requiring manual work
- Fetches live Oracle source code and converts each object through an AI agent with real-time AWS documentation access
- Deploys converted code to Aurora PostgreSQL via Lambda with immediate syntax validation
- Runs 9 automated tests per object covering syntax, deployment, functional testing, and dependency validation
- Implements strict system prompt rules ensuring functional equivalence, parameter fidelity, and trigger event preservation
- Costs approximately $0.03–$0.07 per object conversion; 100-object migration runs $3–$7 total
- Internal testing converted 6 objects at 92% average confidence in 60–75 seconds per object
- Includes security best practices: SQL sanitization, credential management via Secrets Manager, VPC isolation, read-only source access
The solution automates the "last mile" of Oracle-to-PostgreSQL migration by handling complex PL/SQL patterns that AWS DMS Schema Conversion cannot fully convert, reducing manual effort and accelerating database modernization.
The AWS News Feed is currently looking for gold sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.
Related articles
2026
2025
2025
2025
The AWS News Feed is currently looking for silver sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.