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 MySQL database from an EC2 server to an RDS Aurora MySQL database.
Learning Objectives
Successfully complete this lab by achieving the following learning objectives:
- Create Replication Instance
- Name our replication instance aurorareplication
- Give it a Description of mysql to aurora
- Leave most of the defaults, but change the Allocated storage from 50 to 10
- Leave Multi-AZ unchecked
- Uncheck publicly accessible
- Choose the one with Lab_VPC in the title from the dropdown, but for VPC security group select the security group for our databases.
- Multi AZ: Choose Dev or test workload (Single-AZ)
- Uncheck the Publicly accessible box
- Click Create
- Create Endpoints
Create a Target Endpoint
Note: The lab uses an RDS MySQL instance target to stand in for an Aurora DB to speed the lab’s setup for you. The migration process is the same.
- Start off with our Target Endpoint
- Check the box for RDS instance
- Select new-db for the RDS instance
- Leave defaults:
- Target Engine: mysql
- Keep the default Server name
- Leave Port: set to 3306
- leave
cloud_user
as User Name
- Copy the password from the Linux Academy Credentials page and paste it in
- Run test
- Create the Target Endpoint
Create Source Endpoint
- Select Source Endpoint
- Do not check the box for RDS instance
- Set Endpoint identifier to my-db-source
- Leave the defaults, and set Source engine to mysql
- Set Server Name to the private IP address found on the LA credentials page
- Leave Port set at 3306, and leave cloud_user as User name
- Copy the password from the LA credentials page and paste it into the Password field
- Run a test
- Create the source endpoint
- Create the Migration Task
- Add Identifier: aurorareplicationtask
- Choose our Replication Instance
- Choose our Source Endpoint
- Choose our Target Endpoint
- Check the box to make sure the task starts on creation
- Choose Migration Type
- Choose to not include large objects column
- Do not enable validation because it will take longer for creation
- Leave CW logs unchecked
- Leave default for Table mappings
- Create new Selection Rule:
- Leave Schema as default
- Leave Table name as default
- Set Schema name to classicmodels
- Leave Action set to Include
- Create the task