Sedai raises $20 million for the first self-driving cloud!
Read Press Release

Attend a Live Product Tour to see Sedai in action.

Register now
More
Close

AWS Database Migration Service: An In-Depth Guide for 2025

Last updated

July 16, 2025

Published
Topics
Last updated

July 16, 2025

Published
Topics
No items found.
AWS Database Migration Service: An In-Depth Guide for 2025

Table of Contents

Introduction

You've probably dealt with the complexities of migrating databases to the cloud. The benefits are obvious: better flexibility, scalability, and cost savings, but let’s face it, the whole process can feel like a maze with so many cloud services out there. 

That's why we've put together this detailed guide to help you understand how AWS Database Migration Service can make your transition smooth and efficient, without all the headaches.

What is AWS Database Migration Service (DMS)?

AWS Database Migration Service (DMS) lets you seamlessly migrate your databases with zero downtime. Even when you're switching from Oracle to PostgreSQL, AWS DMS handles both homogeneous and heterogeneous migrations, making it the go-to tool for anyone transitioning to the cloud.

Here’s how AWS DMS makes migration easier:

  • Use Change Data Capture (CDC) to continuously migrate data with minimal disruption to your operations.
  • Automate and manage migration tasks, so you don’t need to be a database expert to get the job done.
  • Replicate data to services like Amazon RDS, Aurora, Redshift, DynamoDB, S3, and more.

AWS DMS is perfect for:

  • Lift-and-shift migrations, helping you move databases from on-premises to AWS with ease.
  • Cross-region database replication for disaster recovery scenarios.
  • Data management involves migrating multiple databases into a single data warehouse.

Features of AWS Data Migration Service

When it comes to database migration, the last thing you want is for your business to experience major disruptions. Thankfully, AWS Database Migration Service (DMS) has your back. AWS DMS provides several important features to support database migration: 

1. Homogeneous and heterogeneous migrations

  • Homogeneous migration: Transferring from one type of database to another (e.g., MySQL to MySQL). 
  • Heterogeneous migration: Converting schema and data between different engines (e.g., Oracle to PostgreSQL).

2. Minimal downtime with Change Data Capture (CDC)

  • Change Data Capture (CDC) monitors changes in the source database in real time and transfers those changes to the target database, thus reducing system downtime.
  • Suitable for businesses that operate critical applications that require data to be accessible without interruption. 

3. Fully managed and scalable

  • AWS DMS creates and manages resources, tracks performance, and manages failover cases.
  • Multi-AZ support for high availability.

4. Broad database compatibility

  • Source databases: Oracle, SQL Server, MySQL, PostgreSQL, MongoDB, Amazon Aurora, and more.
  • Target databases: Amazon RDS, Aurora, Redshift, DynamoDB, S3, and OpenSearch.

5. Schema conversion with AWS SCT

  • AWS Schema Conversion Tool (SCT) helps convert database schemas when performing heterogeneous migrations.
  • Automatically transforms stored procedures, views, and triggers to fit the target database.

6. Continuous monitoring and logging

  • AWS CloudWatch integration allows you to monitor migration progress and identify common issues.
  • Logs detailed migration statistics, including error rates, latency, and replication lag.

7. Security and compliance

  • Supports TLS encryption for secure data transfer.
  • Integrates with AWS IAM for fine-grained access control.
  • Compliance with major security standards, including HIPAA, PCI DSS, and SOC.

Up next, how to implement them by setting up the migration service.

Setting Up AWS Data Migration Service

Migrating databases isn’t as simple as flipping a switch. You’ve got a lot to keep track of. From schema conversions to data replication, the process can get overwhelming. 

Let’s walk through how to set up AWS DMS to migrate an Oracle database to Amazon Aurora (MySQL), ensuring a smooth transition with best practices.

Step 1: Requirements for Using AWS DMS

Before jumping into the migration, let’s set up the essential AWS resources you’ll need. Automating this process with AWS CloudFormation means you can focus on the migration itself, not the setup.

Let’s use a template that automatically deploys the following:

  • An AWS VPC with Public Subnets for networking.
  • An AWS DMS Replication Instance to carry out the migration.
  • An Amazon RDS Instance for your target database.
  • An Amazon EC2 Instance to host migration tools like AWS Schema Conversion Tool (SCT) or simulate the source database.

Step 2: Log in to the AWS Console

Here are the steps to follow to log in to the AWS Console:

  • Log in to your AWS Management Console with your credentials.
  • Select your region from the drop-down menu in the top right corner. We’ll use the N. Virginia region for this guide.
  • Navigate to the EC2 Console, then go to the Key Pair section.
  • Create a Key Pair called “DMS” and download the DMS.pem file. Keep this file safe, as you'll need it later.

Step 3: Configure the Environment

Now it’s time to set up the AWS infrastructure. You’ll use CloudFormation to automate this step, allowing you to work directly on the migration.

  • Open the AWS CloudFormation console and click Create Stack.
  • Select Choose an existing template and choose Upload a template file.
  • Download the template file from GitHub Gist, click Choose file, and upload the DMS.yaml file.
  • Fill in the required parameters and click Next.
    • You can adjust the instance type based on your needs, but the default works fine.
  • On the Stack Options page, leave the default settings and click Next.
  • Review the configuration and click Create Stack.

You’ll be redirected to the CloudFormation console, where you’ll see the status as CREATE_IN_PROGRESS. Wait until it says CREATE_COMPLETE

Once done, head to the Outputs section and note down the values you’ll need for the next steps to prepare your source for smooth migration.

Prepare Your Source and Target Database for a Smooth Migration

Migrating databases can feel like walking a tightrope: one wrong move and you risk losing valuable data or facing costly downtime. 

To keep things on track, we’ll focus on setting up both your source and target databases, ensuring everything is aligned for a seamless transition. 

Here's a step-by-step guide to help you configure your databases for migration.

Step 1: Set Up RDP Access for EC2 Instance

To begin, ensure you can access your EC2 instance using Remote Desktop Protocol (RDP). Follow these steps:

For Mac Users:

  • Download Microsoft Remote Desktop from the App Store.

For PC Users:

  • Use the default Remote Desktop client to connect to your EC2 instance.

Step 2: Modify Security Group Rules for RDP Access

Make sure your security settings are optimized:

  1. Open the AWS EC2 Console.
  2. Click on Security Groups and select the security group associated with your instance.
  3. Click Actions > Edit Inbound Rules.
  4. Find the RDP rule (Port 3389), set the Source to My IP for security (or “Anywhere” if on a corporate VPN).
  5. Click Save Rules.

Step 3: Retrieve RDP Credentials

Next, grab your RDP credentials for accessing the EC2 instance:

  1. Go to Instances in the EC2 Console and select your instance.
  2. Click Actions > Connect, then navigate to the RDP Client section.
  3. Upload your Key Pair file, and click Decrypt password.
  4. Save the password for later use.

Step 4: Connect to Your EC2 Instance

Download the RDP file, open it in the Remote Desktop client, and log in using the decrypted password.

Step 5: Connect to Oracle SQL Developer

Once logged into the EC2 instance, you'll need to connect to the Oracle database.

  1. Open Oracle SQL Developer.
  2. Create a new connection with the following details:
    • Connection Name: Source Oracle
    • Username: dbadmin
    • Password: Retrieve from the CloudFormation Stack’s Outputs tab under DMSDBSecretP
    • Hostname: Use the Source Oracle Endpoint from the CloudFormation Output tab.
    • Port: 1521
    • SID: ORACLEDB
  3. Click Test to verify the connection and connect once successful.

Step 6: Configure Oracle for AWS DMS Migration

Before migrating, configure your Oracle database to be AWS DMS-ready:

  1. Create a DMS User with read/write privileges.
  2. Enable ARCHIVELOG MODE for transaction log data.
  3. Enable Supplemental Logging for all required tables.
  4. Grant the necessary privileges to the AWS DMS user.

By following these steps, you’ll have your source and target databases prepped and ready for migration, ensuring a smooth, efficient transfer of data.

The next step is to configure your target environment to handle incoming data efficiently.

Learn To Configure Amazon Aurora (MySQL) Target

When you're migrating to Amazon Aurora (MySQL), configuring the target database is crucial to ensure smooth data transfer and continuous replication. This step will guide you through setting up Aurora as the target for your migration using AWS Schema Conversion Tool (SCT) and AWS Database Migration Service (DMS).

1. Reconnect to the EC2 Instance

Start by reconnecting to your EC2 instance via RDP. Once connected, locate the DMS Workshop folder on your Desktop and double-click AWS Schema Conversion Tool Download to install the latest version.

2. Install AWS Schema Conversion Tool (SCT)

Unzip the tool and follow the installation wizard (default settings should be fine). After installation, launch AWS SCT and accept the terms.

3. Create a MySQL Workbench Connection

Launch MySQL Workbench 8.0 CE and create a new connection for the Aurora MySQL target database using the following details:

  • Connection Name: Target Aurora RDS (MySQL)
  • Host Name: <TargetAuroraMySQLEndpoint>
  • Port: 3306
  • Username: dbadmin
  • Password: Retrieve from CloudFormation Output tab

Test the connection and confirm success.

4. Execute Permissions Script

Run the permission script provided by the GitHub Gist using MySQL Workbench by clicking the lightning icon to execute it.

5. Create a Database Migration Project in AWS SCT

Now that you've set up MySQL Workbench, it's time to create a migration project:

  1. Open AWS SCT.
  2. Go to File > New Project Wizard.
  3. Fill out the project details:
    • Project Name: AWS Schema Conversion Tool Source DB to Aurora MySQL
    • Location: C:\Users\Administrator\AWS Schema Conversion Tool
    • Database Type: SQL Database
    • Source Engine: Oracle
    • Migration Type: I want to switch engines and optimize for the cloud

Click Next to proceed.

6. Connect to the Source Database

Fill in the source database configuration details:

  • Connection Name: Oracle Source
  • Server Name: <SourceOracleEndpoint>
  • Port: 1521
  • Oracle SID: ORACLEDB
  • Username: dbadmin
  • Password: Retrieve from CloudFormation Output tab

Test the connection and proceed if successful.

7. Select Database and Review the Assessment Report

Select the dms_sample database and review the database migration assessment report. Pay attention to objects that may require manual intervention, such as stored procedures and functions.

8. Connect to the Target Database

Fill out the target database configuration:

  • Target Engine: Amazon Aurora (MySQL compatible)
  • Connection Name: Aurora MySQL Target
  • Server Name: <TargetAuroraMySQLEndpoint>
  • Port: 3306
  • Username: dbadmin
  • Password: Retrieve from CloudFormation Output tab

Test the connection and click Finish once successful.

9. Convert the Source Database Schema

  • Right-click on the DMS_SAMPLE database and select Convert Schema.
  • Confirm when prompted about existing objects.
  • Once the schema is converted, apply the changes to the Aurora MySQL target database.

10. Verify Target Database Schema

After conversion, expand the schema in the right panel and ensure all tables, views, and procedures are successfully created in Aurora MySQL.

By completing these steps, you've successfully set up Amazon Aurora (MySQL) as your target database, ready for data migration using AWS DMS.

How to Easily Create a DMS Migration Task

Amazon DMS (Database Migration Service) is your go-to solution for moving data from your source to the target database. Here's a breakdown of the steps to get your migration task up and running:

1. Create a Migration Task

  1. Open the AWS DMS Console.
  2. In the left-hand menu, click Database Migration Tasks.
  3. Hit Create task in the top-right corner.

2. Configure Task Settings

Here are the settings that need to be configured to start migration:

  • Task Identifier: source-to-AuroraMySQL-target
  • Replication Instance: cfn-dmsreplication
  • Source Database Endpoint: Select your source database.
  • Target Database Endpoint: cfn-auroramysqlinstance
  • Migration Type: Migrate existing data and replicate ongoing changes.
  • CDC Stop Mode: Don't use custom CDC stop mode.

  • Create Recovery Table on Target DB: Unchecked.
  • Target Table Preparation Mode: Do nothing.
  • Stop Task After Full Load Completes: Don’t stop.
  • LOB Column Settings: Limited LOB mode.
  • Max LOB Size (KB): 32.
  • Data Validation: Unchecked.
  • Enable CloudWatch Logs: Checked.
  • Log Context: Default levels.
  • Batch-Optimized Apply: Unchecked.

3. Configure Table Mappings

Table mappings are essential for ensuring that the correct data is moved. Here's how to set them up:

  • Expand the Table mappings section.
  • Select Wizard as the editing mode.
  • Click Add new selection rule and input:
    • Schema: DMS_SAMPLE%
    • Table Name: %
    • Action: Include.

4. Configure Transformation Rules

These rules help you shape your data to match your target database's structure. Set them as follows:

  • Rule 1:
    • Target: Schema
    • Schema Name: DMS_SAMPLE
    • Action: Make lowercase.

  • Rule 2:
    • Target: Table
    • Schema Name: DMS_SAMPLE
    • Table Name: %
    • Action: Make lowercase.

  • Rule 3:
    • Target: Column
    • Schema Name: DMS_SAMPLE
    • Table Name: %
    • Action: Make lowercase.

5. Finalize and Start Migration Task

Lastly, let’s wrap the migration:

  • Uncheck Turn on premigration assessment (it’s not needed for this task).
  • Ensure the Migration task startup configuration is set to Start automatically on create.
  • Click Create task to finalize.

Once you've configured your migration task, you're set for a smooth, efficient data transfer in the next step. If you've followed these steps, you're on your way to optimizing your cloud architecture and reducing costs.

How To Start Performing the Migration in AWS Data Migration Service?

With the right strategy and tools, your migration can be smooth, even when dealing with complex cloud environments. Here's how to execute it with precision.

Step 1: Initiating the Migration

The clock starts ticking when you initiate the migration. The task will go through these statuses:

  1. Creating
  2. Ready
  3. Starting
  4. Running

Keep an eye on progress by clicking the circular refresh button to update the task's status.

Step 2: Monitoring the Migration

Once your migration is underway, monitoring is key. AWS DMS provides CloudWatch metrics, so you can track the performance of both your replication instance and migration tasks.

Viewing CloudWatch metrics for replication instances:

  1. Open the AWS DMS Console.
  2. In the left-hand menu, click Replication Instances.
  3. Select your replication instance.
  4. Head to the CloudWatch Metrics tab to view performance data.

Viewing CloudWatch metrics for migration tasks:

  1. Open the AWS DMS Console.
  2. Click Database Migration Tasks in the left-hand menu.
  3. Select your DMS task.
  4. Go to the Monitor tab to check task performance.

With CloudWatch, you can track critical metrics like latency, replication lag, and task status, all key to keeping your migration on track.

Cheatsheet For Handling Migration Errors and Warnings in DMS

Things don’t always go as planned, and migration errors can pop up. Here are some common issues you might face and how to resolve them.

1. Connection Failures:

  • Issue: DMS can’t connect to the source or target database.
  • Resolution: Check VPC settings, Security Groups, and subnet availability. Ensure the correct database hostname, port, and credentials are used. Test connection by clicking Test Endpoint Connection in the DMS Console.

2. Data Integrity Issues:

  • Issue: Missing or inconsistent data between source and target.
  • Resolution: Enable CDC validation to check for missing transactions. Compare row counts using CloudWatch metrics, and run checksum validation queries on both databases.

3. Performance Bottlenecks:

  • Issue: Migration is slow or lagging.
  • Resolution: Enable Parallel Load for faster bulk transfers, adjust LOB mode, and monitor CloudWatch metrics for CPU, memory, and replication lag.

4. Target Database Constraints and Triggers:

  • Issue: Foreign key violations or unexpected data modifications.
  • Resolution: Disable foreign key constraints before migration, and drop triggers temporarily on the target database to avoid conflicts.

5. CDC Replication Stopped Unexpectedly:

  • Issue: The task stops before applying ongoing changes.
  • Resolution: Check the CDC start position in the logs. Ensure the log retention period is sufficient (e.g., 24 hours for Oracle LogMiner). Restart the CDC task from the last applied transaction.

6. Schema Mismatch Between Source and Target:

  • Issue: Some objects fail to migrate due to schema differences.
  • Resolution: Use AWS SCT (Schema Conversion Tool) to assess incompatibilities, and apply manual schema modifications if necessary.

7. Checking Logs and Debugging Errors:

  • Resolution: Use AWS CloudWatch logs. Filter logs by keywords like failure, timeout, or constraint violation. Enable Verbose Logging for deeper insights.

With everything cleaned up, your migration is officially complete.

Ready for the next stage of cloud migration? This is just the start. Continue optimizing your cloud strategy with Sedai’s automated monitoring and cost reduction to get even more out of your cloud environment. Let’s discuss more about this in the next section.

Why AWS DMS Still Feels Risky for Many Teams

Migrating databases using AWS Database Migration Service (DMS) often feels like navigating a maze. Costs can spike unexpectedly, resources can get over- or underprovisioned, and even a small misstep can ripple into downtime or budget overruns. For teams managing large or ongoing migrations, staying ahead of these challenges without clear visibility can be a real struggle.

That’s why more engineering teams are adopting AI-driven platforms like Sedai to bring predictability into the process. By analyzing resource patterns and flagging inefficiencies early, Sedai helps teams stay on track, avoiding surprises, reducing manual tuning, and ensuring smooth migrations without unnecessary overhead.

Final Thoughts

Migrating to AWS doesn't have to be complicated. With the right strategies and tools, like AWS DMS and Sedai, you can streamline the process and optimize it for both cost-efficiency and performance. 

Sedai's AI-powered solutions automate and simplify the migration process, helping teams avoid headaches and setting up infrastructure for long-term success. 

Experience Sedai’s power firsthand and see how it can set up your infrastructure for long-term success.

FAQs

  1. How can I minimize downtime during the AWS Database Migration process?
    To minimize downtime, carefully plan your migration using AWS DMS’s continuous data replication feature. This ensures that your database remains functional during migration, allowing for near-zero downtime.
  2. What are the common challenges faced during AWS Database Migration?
    Some of the common challenges include data inconsistency, network latency, and potential compatibility issues with different database engines. Proper testing and monitoring during the migration phase can help mitigate these risks.
  3. How can I ensure data security during database migration to AWS?
    Use AWS’s encryption capabilities, such as SSL/TLS encryption for transit data and rest encryption. Additionally, IAM roles and policies must be configured correctly to protect sensitive data.
  4. How can I optimize my AWS Database Migration costs?
    Optimize costs by choosing the correct database instance sizes, using reserved instances, and leveraging AWS’s pricing tools like the AWS Cost Explorer. Monitoring and adjusting based on usage also helps avoid unnecessary expenses.
  5. How does Sedai help with AWS Database Migration?
    Sedai's AI-driven cloud optimization platform provides automated insights and continuous optimization throughout the database migration process. By using Sedai, you ensure that your cloud resources are migrated efficiently and cost-optimized, minimizing your overall cloud spend post-migration.

Was this content helpful?

Thank you for submitting your feedback.
Oops! Something went wrong while submitting the form.

Related Posts

CONTENTS

AWS Database Migration Service: An In-Depth Guide for 2025

Published on
Last updated on

July 16, 2025

Max 3 min
AWS Database Migration Service: An In-Depth Guide for 2025

Introduction

You've probably dealt with the complexities of migrating databases to the cloud. The benefits are obvious: better flexibility, scalability, and cost savings, but let’s face it, the whole process can feel like a maze with so many cloud services out there. 

That's why we've put together this detailed guide to help you understand how AWS Database Migration Service can make your transition smooth and efficient, without all the headaches.

What is AWS Database Migration Service (DMS)?

AWS Database Migration Service (DMS) lets you seamlessly migrate your databases with zero downtime. Even when you're switching from Oracle to PostgreSQL, AWS DMS handles both homogeneous and heterogeneous migrations, making it the go-to tool for anyone transitioning to the cloud.

Here’s how AWS DMS makes migration easier:

  • Use Change Data Capture (CDC) to continuously migrate data with minimal disruption to your operations.
  • Automate and manage migration tasks, so you don’t need to be a database expert to get the job done.
  • Replicate data to services like Amazon RDS, Aurora, Redshift, DynamoDB, S3, and more.

AWS DMS is perfect for:

  • Lift-and-shift migrations, helping you move databases from on-premises to AWS with ease.
  • Cross-region database replication for disaster recovery scenarios.
  • Data management involves migrating multiple databases into a single data warehouse.

Features of AWS Data Migration Service

When it comes to database migration, the last thing you want is for your business to experience major disruptions. Thankfully, AWS Database Migration Service (DMS) has your back. AWS DMS provides several important features to support database migration: 

1. Homogeneous and heterogeneous migrations

  • Homogeneous migration: Transferring from one type of database to another (e.g., MySQL to MySQL). 
  • Heterogeneous migration: Converting schema and data between different engines (e.g., Oracle to PostgreSQL).

2. Minimal downtime with Change Data Capture (CDC)

  • Change Data Capture (CDC) monitors changes in the source database in real time and transfers those changes to the target database, thus reducing system downtime.
  • Suitable for businesses that operate critical applications that require data to be accessible without interruption. 

3. Fully managed and scalable

  • AWS DMS creates and manages resources, tracks performance, and manages failover cases.
  • Multi-AZ support for high availability.

4. Broad database compatibility

  • Source databases: Oracle, SQL Server, MySQL, PostgreSQL, MongoDB, Amazon Aurora, and more.
  • Target databases: Amazon RDS, Aurora, Redshift, DynamoDB, S3, and OpenSearch.

5. Schema conversion with AWS SCT

  • AWS Schema Conversion Tool (SCT) helps convert database schemas when performing heterogeneous migrations.
  • Automatically transforms stored procedures, views, and triggers to fit the target database.

6. Continuous monitoring and logging

  • AWS CloudWatch integration allows you to monitor migration progress and identify common issues.
  • Logs detailed migration statistics, including error rates, latency, and replication lag.

7. Security and compliance

  • Supports TLS encryption for secure data transfer.
  • Integrates with AWS IAM for fine-grained access control.
  • Compliance with major security standards, including HIPAA, PCI DSS, and SOC.

Up next, how to implement them by setting up the migration service.

Setting Up AWS Data Migration Service

Migrating databases isn’t as simple as flipping a switch. You’ve got a lot to keep track of. From schema conversions to data replication, the process can get overwhelming. 

Let’s walk through how to set up AWS DMS to migrate an Oracle database to Amazon Aurora (MySQL), ensuring a smooth transition with best practices.

Step 1: Requirements for Using AWS DMS

Before jumping into the migration, let’s set up the essential AWS resources you’ll need. Automating this process with AWS CloudFormation means you can focus on the migration itself, not the setup.

Let’s use a template that automatically deploys the following:

  • An AWS VPC with Public Subnets for networking.
  • An AWS DMS Replication Instance to carry out the migration.
  • An Amazon RDS Instance for your target database.
  • An Amazon EC2 Instance to host migration tools like AWS Schema Conversion Tool (SCT) or simulate the source database.

Step 2: Log in to the AWS Console

Here are the steps to follow to log in to the AWS Console:

  • Log in to your AWS Management Console with your credentials.
  • Select your region from the drop-down menu in the top right corner. We’ll use the N. Virginia region for this guide.
  • Navigate to the EC2 Console, then go to the Key Pair section.
  • Create a Key Pair called “DMS” and download the DMS.pem file. Keep this file safe, as you'll need it later.

Step 3: Configure the Environment

Now it’s time to set up the AWS infrastructure. You’ll use CloudFormation to automate this step, allowing you to work directly on the migration.

  • Open the AWS CloudFormation console and click Create Stack.
  • Select Choose an existing template and choose Upload a template file.
  • Download the template file from GitHub Gist, click Choose file, and upload the DMS.yaml file.
  • Fill in the required parameters and click Next.
    • You can adjust the instance type based on your needs, but the default works fine.
  • On the Stack Options page, leave the default settings and click Next.
  • Review the configuration and click Create Stack.

You’ll be redirected to the CloudFormation console, where you’ll see the status as CREATE_IN_PROGRESS. Wait until it says CREATE_COMPLETE

Once done, head to the Outputs section and note down the values you’ll need for the next steps to prepare your source for smooth migration.

Prepare Your Source and Target Database for a Smooth Migration

Migrating databases can feel like walking a tightrope: one wrong move and you risk losing valuable data or facing costly downtime. 

To keep things on track, we’ll focus on setting up both your source and target databases, ensuring everything is aligned for a seamless transition. 

Here's a step-by-step guide to help you configure your databases for migration.

Step 1: Set Up RDP Access for EC2 Instance

To begin, ensure you can access your EC2 instance using Remote Desktop Protocol (RDP). Follow these steps:

For Mac Users:

  • Download Microsoft Remote Desktop from the App Store.

For PC Users:

  • Use the default Remote Desktop client to connect to your EC2 instance.

Step 2: Modify Security Group Rules for RDP Access

Make sure your security settings are optimized:

  1. Open the AWS EC2 Console.
  2. Click on Security Groups and select the security group associated with your instance.
  3. Click Actions > Edit Inbound Rules.
  4. Find the RDP rule (Port 3389), set the Source to My IP for security (or “Anywhere” if on a corporate VPN).
  5. Click Save Rules.

Step 3: Retrieve RDP Credentials

Next, grab your RDP credentials for accessing the EC2 instance:

  1. Go to Instances in the EC2 Console and select your instance.
  2. Click Actions > Connect, then navigate to the RDP Client section.
  3. Upload your Key Pair file, and click Decrypt password.
  4. Save the password for later use.

Step 4: Connect to Your EC2 Instance

Download the RDP file, open it in the Remote Desktop client, and log in using the decrypted password.

Step 5: Connect to Oracle SQL Developer

Once logged into the EC2 instance, you'll need to connect to the Oracle database.

  1. Open Oracle SQL Developer.
  2. Create a new connection with the following details:
    • Connection Name: Source Oracle
    • Username: dbadmin
    • Password: Retrieve from the CloudFormation Stack’s Outputs tab under DMSDBSecretP
    • Hostname: Use the Source Oracle Endpoint from the CloudFormation Output tab.
    • Port: 1521
    • SID: ORACLEDB
  3. Click Test to verify the connection and connect once successful.

Step 6: Configure Oracle for AWS DMS Migration

Before migrating, configure your Oracle database to be AWS DMS-ready:

  1. Create a DMS User with read/write privileges.
  2. Enable ARCHIVELOG MODE for transaction log data.
  3. Enable Supplemental Logging for all required tables.
  4. Grant the necessary privileges to the AWS DMS user.

By following these steps, you’ll have your source and target databases prepped and ready for migration, ensuring a smooth, efficient transfer of data.

The next step is to configure your target environment to handle incoming data efficiently.

Learn To Configure Amazon Aurora (MySQL) Target

When you're migrating to Amazon Aurora (MySQL), configuring the target database is crucial to ensure smooth data transfer and continuous replication. This step will guide you through setting up Aurora as the target for your migration using AWS Schema Conversion Tool (SCT) and AWS Database Migration Service (DMS).

1. Reconnect to the EC2 Instance

Start by reconnecting to your EC2 instance via RDP. Once connected, locate the DMS Workshop folder on your Desktop and double-click AWS Schema Conversion Tool Download to install the latest version.

2. Install AWS Schema Conversion Tool (SCT)

Unzip the tool and follow the installation wizard (default settings should be fine). After installation, launch AWS SCT and accept the terms.

3. Create a MySQL Workbench Connection

Launch MySQL Workbench 8.0 CE and create a new connection for the Aurora MySQL target database using the following details:

  • Connection Name: Target Aurora RDS (MySQL)
  • Host Name: <TargetAuroraMySQLEndpoint>
  • Port: 3306
  • Username: dbadmin
  • Password: Retrieve from CloudFormation Output tab

Test the connection and confirm success.

4. Execute Permissions Script

Run the permission script provided by the GitHub Gist using MySQL Workbench by clicking the lightning icon to execute it.

5. Create a Database Migration Project in AWS SCT

Now that you've set up MySQL Workbench, it's time to create a migration project:

  1. Open AWS SCT.
  2. Go to File > New Project Wizard.
  3. Fill out the project details:
    • Project Name: AWS Schema Conversion Tool Source DB to Aurora MySQL
    • Location: C:\Users\Administrator\AWS Schema Conversion Tool
    • Database Type: SQL Database
    • Source Engine: Oracle
    • Migration Type: I want to switch engines and optimize for the cloud

Click Next to proceed.

6. Connect to the Source Database

Fill in the source database configuration details:

  • Connection Name: Oracle Source
  • Server Name: <SourceOracleEndpoint>
  • Port: 1521
  • Oracle SID: ORACLEDB
  • Username: dbadmin
  • Password: Retrieve from CloudFormation Output tab

Test the connection and proceed if successful.

7. Select Database and Review the Assessment Report

Select the dms_sample database and review the database migration assessment report. Pay attention to objects that may require manual intervention, such as stored procedures and functions.

8. Connect to the Target Database

Fill out the target database configuration:

  • Target Engine: Amazon Aurora (MySQL compatible)
  • Connection Name: Aurora MySQL Target
  • Server Name: <TargetAuroraMySQLEndpoint>
  • Port: 3306
  • Username: dbadmin
  • Password: Retrieve from CloudFormation Output tab

Test the connection and click Finish once successful.

9. Convert the Source Database Schema

  • Right-click on the DMS_SAMPLE database and select Convert Schema.
  • Confirm when prompted about existing objects.
  • Once the schema is converted, apply the changes to the Aurora MySQL target database.

10. Verify Target Database Schema

After conversion, expand the schema in the right panel and ensure all tables, views, and procedures are successfully created in Aurora MySQL.

By completing these steps, you've successfully set up Amazon Aurora (MySQL) as your target database, ready for data migration using AWS DMS.

How to Easily Create a DMS Migration Task

Amazon DMS (Database Migration Service) is your go-to solution for moving data from your source to the target database. Here's a breakdown of the steps to get your migration task up and running:

1. Create a Migration Task

  1. Open the AWS DMS Console.
  2. In the left-hand menu, click Database Migration Tasks.
  3. Hit Create task in the top-right corner.

2. Configure Task Settings

Here are the settings that need to be configured to start migration:

  • Task Identifier: source-to-AuroraMySQL-target
  • Replication Instance: cfn-dmsreplication
  • Source Database Endpoint: Select your source database.
  • Target Database Endpoint: cfn-auroramysqlinstance
  • Migration Type: Migrate existing data and replicate ongoing changes.
  • CDC Stop Mode: Don't use custom CDC stop mode.

  • Create Recovery Table on Target DB: Unchecked.
  • Target Table Preparation Mode: Do nothing.
  • Stop Task After Full Load Completes: Don’t stop.
  • LOB Column Settings: Limited LOB mode.
  • Max LOB Size (KB): 32.
  • Data Validation: Unchecked.
  • Enable CloudWatch Logs: Checked.
  • Log Context: Default levels.
  • Batch-Optimized Apply: Unchecked.

3. Configure Table Mappings

Table mappings are essential for ensuring that the correct data is moved. Here's how to set them up:

  • Expand the Table mappings section.
  • Select Wizard as the editing mode.
  • Click Add new selection rule and input:
    • Schema: DMS_SAMPLE%
    • Table Name: %
    • Action: Include.

4. Configure Transformation Rules

These rules help you shape your data to match your target database's structure. Set them as follows:

  • Rule 1:
    • Target: Schema
    • Schema Name: DMS_SAMPLE
    • Action: Make lowercase.

  • Rule 2:
    • Target: Table
    • Schema Name: DMS_SAMPLE
    • Table Name: %
    • Action: Make lowercase.

  • Rule 3:
    • Target: Column
    • Schema Name: DMS_SAMPLE
    • Table Name: %
    • Action: Make lowercase.

5. Finalize and Start Migration Task

Lastly, let’s wrap the migration:

  • Uncheck Turn on premigration assessment (it’s not needed for this task).
  • Ensure the Migration task startup configuration is set to Start automatically on create.
  • Click Create task to finalize.

Once you've configured your migration task, you're set for a smooth, efficient data transfer in the next step. If you've followed these steps, you're on your way to optimizing your cloud architecture and reducing costs.

How To Start Performing the Migration in AWS Data Migration Service?

With the right strategy and tools, your migration can be smooth, even when dealing with complex cloud environments. Here's how to execute it with precision.

Step 1: Initiating the Migration

The clock starts ticking when you initiate the migration. The task will go through these statuses:

  1. Creating
  2. Ready
  3. Starting
  4. Running

Keep an eye on progress by clicking the circular refresh button to update the task's status.

Step 2: Monitoring the Migration

Once your migration is underway, monitoring is key. AWS DMS provides CloudWatch metrics, so you can track the performance of both your replication instance and migration tasks.

Viewing CloudWatch metrics for replication instances:

  1. Open the AWS DMS Console.
  2. In the left-hand menu, click Replication Instances.
  3. Select your replication instance.
  4. Head to the CloudWatch Metrics tab to view performance data.

Viewing CloudWatch metrics for migration tasks:

  1. Open the AWS DMS Console.
  2. Click Database Migration Tasks in the left-hand menu.
  3. Select your DMS task.
  4. Go to the Monitor tab to check task performance.

With CloudWatch, you can track critical metrics like latency, replication lag, and task status, all key to keeping your migration on track.

Cheatsheet For Handling Migration Errors and Warnings in DMS

Things don’t always go as planned, and migration errors can pop up. Here are some common issues you might face and how to resolve them.

1. Connection Failures:

  • Issue: DMS can’t connect to the source or target database.
  • Resolution: Check VPC settings, Security Groups, and subnet availability. Ensure the correct database hostname, port, and credentials are used. Test connection by clicking Test Endpoint Connection in the DMS Console.

2. Data Integrity Issues:

  • Issue: Missing or inconsistent data between source and target.
  • Resolution: Enable CDC validation to check for missing transactions. Compare row counts using CloudWatch metrics, and run checksum validation queries on both databases.

3. Performance Bottlenecks:

  • Issue: Migration is slow or lagging.
  • Resolution: Enable Parallel Load for faster bulk transfers, adjust LOB mode, and monitor CloudWatch metrics for CPU, memory, and replication lag.

4. Target Database Constraints and Triggers:

  • Issue: Foreign key violations or unexpected data modifications.
  • Resolution: Disable foreign key constraints before migration, and drop triggers temporarily on the target database to avoid conflicts.

5. CDC Replication Stopped Unexpectedly:

  • Issue: The task stops before applying ongoing changes.
  • Resolution: Check the CDC start position in the logs. Ensure the log retention period is sufficient (e.g., 24 hours for Oracle LogMiner). Restart the CDC task from the last applied transaction.

6. Schema Mismatch Between Source and Target:

  • Issue: Some objects fail to migrate due to schema differences.
  • Resolution: Use AWS SCT (Schema Conversion Tool) to assess incompatibilities, and apply manual schema modifications if necessary.

7. Checking Logs and Debugging Errors:

  • Resolution: Use AWS CloudWatch logs. Filter logs by keywords like failure, timeout, or constraint violation. Enable Verbose Logging for deeper insights.

With everything cleaned up, your migration is officially complete.

Ready for the next stage of cloud migration? This is just the start. Continue optimizing your cloud strategy with Sedai’s automated monitoring and cost reduction to get even more out of your cloud environment. Let’s discuss more about this in the next section.

Why AWS DMS Still Feels Risky for Many Teams

Migrating databases using AWS Database Migration Service (DMS) often feels like navigating a maze. Costs can spike unexpectedly, resources can get over- or underprovisioned, and even a small misstep can ripple into downtime or budget overruns. For teams managing large or ongoing migrations, staying ahead of these challenges without clear visibility can be a real struggle.

That’s why more engineering teams are adopting AI-driven platforms like Sedai to bring predictability into the process. By analyzing resource patterns and flagging inefficiencies early, Sedai helps teams stay on track, avoiding surprises, reducing manual tuning, and ensuring smooth migrations without unnecessary overhead.

Final Thoughts

Migrating to AWS doesn't have to be complicated. With the right strategies and tools, like AWS DMS and Sedai, you can streamline the process and optimize it for both cost-efficiency and performance. 

Sedai's AI-powered solutions automate and simplify the migration process, helping teams avoid headaches and setting up infrastructure for long-term success. 

Experience Sedai’s power firsthand and see how it can set up your infrastructure for long-term success.

FAQs

  1. How can I minimize downtime during the AWS Database Migration process?
    To minimize downtime, carefully plan your migration using AWS DMS’s continuous data replication feature. This ensures that your database remains functional during migration, allowing for near-zero downtime.
  2. What are the common challenges faced during AWS Database Migration?
    Some of the common challenges include data inconsistency, network latency, and potential compatibility issues with different database engines. Proper testing and monitoring during the migration phase can help mitigate these risks.
  3. How can I ensure data security during database migration to AWS?
    Use AWS’s encryption capabilities, such as SSL/TLS encryption for transit data and rest encryption. Additionally, IAM roles and policies must be configured correctly to protect sensitive data.
  4. How can I optimize my AWS Database Migration costs?
    Optimize costs by choosing the correct database instance sizes, using reserved instances, and leveraging AWS’s pricing tools like the AWS Cost Explorer. Monitoring and adjusting based on usage also helps avoid unnecessary expenses.
  5. How does Sedai help with AWS Database Migration?
    Sedai's AI-driven cloud optimization platform provides automated insights and continuous optimization throughout the database migration process. By using Sedai, you ensure that your cloud resources are migrated efficiently and cost-optimized, minimizing your overall cloud spend post-migration.

Was this content helpful?

Thank you for submitting your feedback.
Oops! Something went wrong while submitting the form.