Using DMS to Migrate a Database for Cost Optimization

Get Started
1 hour
  • 4 Learning Objectives

About this Hands-on Lab

One of the most important aspects of any migration of data to the cloud is cost optimization. Luckily, AWS has made this relatively simple thanks to the Database Migration Service. In this hands-on lab, we are going to use the Database Migrations Service (DMS) to migrate a database from an EC2 server to RDS in order to gain the cost savings of running your database on an RDS instance versus an EC2 instance and also getting the full benefit of AWS’s hosted architecture.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Create a Replication Instance
  1. Add a name: COreplicationdb
  2. Add description: MySQL EC2 to MySQL RDS
  3. Choose t2.micro.
  4. Set the Engine version to 2.4.3 or the latest version.
  5. Set the Allocated Storage (GB) to 10.
  6. Choose the lab VPC.
  7. Choose no for multi-AZ to ensure multi-AZ is NOT selected.
  8. Uncheck publicly accessible.
  9. Under advanced, change 50 to 10.
  10. For the replication subnet group, choose the default VPC.
  11. Leave no preference for AZ.
  12. Choose the Database Security Group.
  13. For KMS, leave the defaults.
Create a Target Endpoint
  1. Check the Target box.
  2. Check the RDS instance box.
  3. Select the new-db instance from the drop down.
  4. Leave the defaults for the endpoint identifier, target engine, server name, and port number.
  5. For SSL mode, select None.
  6. The user name is cloud_user.
  7. For the password, we have to go back to our Linux Academy credentials and copy and paste the password.
  8. Choose our lab VPC again, the replication instance we created, and run the test.
Create a Source Endpoint
  1. Leave source checked this time.
  2. Do not select the RDS DB instance.
  3. For our endpoint identifier, we can add my-db-source.
  4. For our source engine, we need to select MySQL.
  5. For the server name, we need our EC2 instance’s private IP address (10.0.0.121). This is listed on the LA credentials, so let’s copy and paste it in.
  6. The port will be 3306 again, the same for our target endpoint.
  7. The SSL mode will also be none again.
  8. The user name is cloud_user.
  9. The password is the same password we used for our target endpoint from the LA credential page.
  10. Again, choose the lab VPC and the replication instance we created.
  11. Run the test.
Create a Task
  1. Add a name: replicationtask
  2. Our replication instance and source and target endpoints are already populated.
  3. For the migration type, click in and see our options, then choose Migrate existing data.
  4. Leave the drop tables on Target for the target table preparation mode.
  5. For the option to include large objects, choose the Do not include large object columns.
  6. Leave Enable validation unchecked; otherwise, it will delay the creation of our task.
  7. Under table mappings, choose classicmodels for our schema.
  8. Leave the table name as a wildcard.
  9. Click on Add selection rule.
  10. Click Create task.

Additional Resources

One of the most overlooked areas of migrating your infrastructure over to AWS is data transfer and data storage. As the Senior Solutions Architect, you have have been tasked with optimizing the data transfer to more cost-effective solutions after the migration has been completed. You have identified the cost savings of moving a database currently running on an EC2 instance to an RDS instance and have decided to use the AWS Data Migration Service. Let's get started!!!

Ensure you are in us-east-1 and log in to the AWS console using the credentials provided.

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Get Started
Who’s going to be learning?

How many seats do you need?

  • $499 USD per seat per year
  • Billed Annually
  • Renews in 12 months

Ready to accelerate learning?

For over 25 licenses, a member of our sales team will walk you through a custom tailored solution for your business.


$2,495.00

Checkout
Sign In
Welcome Back!
Thanks for reaching out!

You’ll hear from us shortly. In the meantime, why not check out what our customers have to say about ACG?