Skip to content

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.
  • Labs icon Lab
  • A Cloud Guru
Google Cloud Platform icon
Labs

Using DMS to Migrate a Database for Cost Optimization

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.

Google Cloud Platform icon
Labs

Path Info

Level
Clock icon Intermediate
Duration
Clock icon 1h 0m
Published
Clock icon Dec 13, 2019

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.

Table of Contents

  1. Challenge

    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.
  2. Challenge

    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.
  3. Challenge

    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.
  4. Challenge

    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.

The Cloud Content team comprises subject matter experts hyper focused on services offered by the leading cloud vendors (AWS, GCP, and Azure), as well as cloud-related technologies such as Linux and DevOps. The team is thrilled to share their knowledge to help you build modern tech solutions from the ground up, secure and optimize your environments, and so much more!

What's a lab?

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.

Provided environment for hands-on practice

We will provide the credentials and environment necessary for you to practice right within your browser.

Guided walkthrough

Follow along with the author’s guided walkthrough and build something new in your provided environment!

Did you know?

On average, you retain 75% more of your learning if you get time for practice.

Start learning by doing today

View Plans