AWS Data Migration Service | Aurora MYSQL [Hands on Lab]
Unable to load video.
Watch VideoSummary
This AWS lab demonstrates migrating a MySQL database to an AWS Aurora MySQL database using the AWS Data Migration Service (DMS). The process involves creating a DMS replication instance, source and target endpoints for the databases, and testing the endpoint connections. A data migration task is then created to define the migration rules, followed by monitoring the task's progress via CloudWatch. The lab concludes by verifying the successful migration of data from the source MySQL database to the target Aurora MySQL database. Finally, the successful migration is confirmed by querying the target database.
Chat With YouTube Video
Full Transcript
hi welcome to this lab on AWS data migration service I am Eliza tanveer from skill curb and in this lab we will learn how to migrate a mySQL database to AWS Aurora mySQL database this is going to be the solution where I'll have a source database which is going to be a mySQL database and I am going to have a Target database which is going to be Aurora mySQL database and I am going to migrate the database from the source to the Target using AWS data migration service application instance the steps that will be followed are first we will create a DMS instance which actually is going to be a replication then we will create source and Target endpoints which will contain the information about source and Target databases then we will test the endpoints by checking its connection then we will create a data migration task that that will Define rules to migrate the on-premise mySQL database to AWS Aurora SQL database and then finally we will monitor the migration task so the first step is to create a database and for that you have to go to RDS and select create database then from the database creation method you have to select standard create and since we are creating Source database then from engine options you have to select MySQL addition will be automatically updated version will be automatically updated then from the templates you have to select free tier as it will not cost you anything then from settings I am going to give a suitable identifier to the DP instance and I am going to leave the master username as admin and provide appropriate password I am not going to change anything else except public accessibility I am going to change it to yes so that it can be easily accessed from our local machines from here I am going to select default to VPC and password authentication for the database and then I'll simply click create database for this lab I have already created two databases you can view the databases by typing RDS in the search bar from here click on databases from the navigation panel and you will see all the databases so the database which is named database is an aurora mySQL database and so it is going to be our Target DB while database 1 is a mySQL database which is going to be our source database now we will move to our first step which is to create a DMS instance which is also called a replication instance so for that type DMS in the search bar from the navigation panel select replication instances here you have to click create replication instance here we have to provide a name to the replication instance I am going to call it TMS replication Arn is optional so we will leave it and we are going to give a suitable description to the replication instance here we will Define the instance configuration for instance class I will select DMS T3 micro engine version will be 3.4.7 and for availability Zone I will select single easy keep allocated storage to 50 GB network type should be ipv4 no need to change VPC and I will uncheck the public accessible checkbox and click on create replication instance here our first step is done this will take about five to seven minutes to be created so in the meantime we will move towards step two which is to create end points from the navigation panel select end points here click on create endpoint and then from the end point type you have to select Source endpoint because our database isn't on premise so that's why we are not going to select the rdsdb instance checks box if we are moving the data from cloud then it has to be checked now we have to give an endpoint identifier I am going to call it Source endpoint MySQL I am going to leave Arn and I am going to select the source engine which is going to be MySQL you can also select AWS secret manager for that you have to provide the secret ID and I am enrolled but I am going to select provide access information manually here we have to provide a server name which is going to be the endpoint path of my mySQL database so I will move to my database and copy the end point and paste it as the server name Port is double three zero six and here you have to enter the username and password which was allocated to your date and click create endpoint so our source endpoint is created now we are going to create the target endpoint for that click create endpoint and from the endpoint type you have to select the target endpoint now check the select RDS in DB instance and select the database instance for the Aurora mySQL database at the endpoint configurations will be autofilled and we only have to provide the access information manually we have to provide the database password username is automatically filled no need to change the SSL layer and click create endpoint this marks the completion of our second step let's take replication instance once it is created then we will move to our third step third step which is to test the end points from end point select Source endpoint MySQL and from action select test connection select DMS replication from the drop down menu and click run test while it is testing I'll parallely test the target endpoint our source endpoint test is successful now I am going to check the target endpoints test and once it is successful it means that our third step is completed now we will move to our fourth step which is to create the database migration task for that I am going to select database migration tasks from the navigation panel now click on database migration task here you have to assign a task identifier I am going to call it DMS replication demo leave Arn as optional and then I am going to select replication instance which is going to be DMS replication then I'm going to select the database endpoint for source and Target and then I am going to select the migration type there are multiple options you can I I choose from one of them I am going to select my create existing then for the task settings we don't need to change anything keep editing mode as wizard Target table preparation mode as drop tables on target for the table mapping the editing mode should be Wizard and then I am going to define the selections for this click add new selection tool and from there I have to select the schema for that I am going to choose enter a schema this is the schema of our mySQL database its name is test owner there is a single table called tutorials Table and there are total three records inside that table here we have to provide the source name which is going to be our database name which is test owner The Source table name we have to provide a modulus and action we have to select include after that we have to Define transformation rules which are the rules for the Target database for that click add transformation for the rule Target choose schema so for the source name select enter a schema and enter the database name as the source name there are multiple actions from which you can choose I am going to select make lowercase which is going to migrate all the data and convert it to a lowercase no need to change anything else and simply click create task button our fourth step is completed and once it is created we are going to click it and view the table statistics for the migration task here you can see that we have successfully migrated the database to the test owner which has a table tutorial stable and has three records the load state is shown as table completed the elapsed time is your less than one second full load rows are three which means that all rows have been migrated after viewing the statistics now we are going to monitor the migration job using cloudwatch Matrix here in the cloud watch metrics you can clearly see the number of database sessions transactions that were performed per second doubles that were inserted tuples that were returned and the block IO of the database now after viewing the metrics we are going to confirm whether the data has been migrated or Not Here is our test owner database which is Aurora MySQL bet database the table tutorial stable has been migrated now we'll check the presence of the record so I am going to Simply run a select query that is going to select all the record from the tape tutorials table to see whether all the three records are present there or not once you execute the QD you are going to see that all the three records have been successfully migrated from the source to the Target database that's all for this lab thank you [Music]