Creating a Replication Instance
- Now lets create a replication instance which will migrate the database from source to target.




- Creation of this instance will take few minutes


- After the Replication instance is created, we need to test the source and target endpoints




- Migration Types
- Migration existing data => one time migration
- Migration existing data & Replicate On going changes => migration & Replication Setup
- Replicate On going changes => replication

- Now lets create a replication task. For this activity we will be using one time migration







- Lets change the schema to be migrated as employees and start the replication.

- Now Lets wait for the task to be completed


- Now to verify if the all the records have been migrated or note we can do basic checks
use employees;
select count(*) from departments;
select count(*) from dept_emp;
select count(*) from dept_manager;
select count(*) from employees;
select count(*) from salaries;
select count(*) from titles;
- If you want to replicate ongoing changes then aws displays the following message

- Refer Here for the mysql docs on how to do this activity
- Lets create a Replication task

- As observed in the class if we replicate ongoing changes, the changes in the source db will automatically reach the target database
- Exercise:
- Try to setup a migration from postgreSQL running on t2.micro instance to AWS RDS with Postgresql
- Refer Here for the steps to install postgresql
