Coder Social home page Coder Social logo

epomatti / aws-dms-migration Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 392 KB

AWS DMS database migration exercise with RDS database targets.

License: MIT License

HCL 98.03% Shell 1.97%
aws aws-dms aws-rds ec2 mysql rds-aurora rds-mysql terraform

aws-dms-migration's Introduction

AWS Data Migration Service (DMS)

Migration sandbox from a mocked on-premises MySQL server database to AWS RDS (MySQL, Postgres, Aurora).

Crete the source database

Create the EC2 source database infrastructure:

terraform -chdir='ec2-mysql' init
terraform -chdir='ec2-mysql' apply -auto-approve

MySQL will be installed and running via user-data.

Log into the VM using SSM.

Use sudo mysql and execute the contexts of file prepare-database-.sql available in this repository. You can use your favorite SQL editor at this point too.

Once the objects are created, execute the procedure to populate the table.

CALL populate();

The database now have items to be replicated to RDS.

Create the migration resources

This will create the migration instance, and the RDS databse instances.

First create the variables:

touch aws-dms/.auto.tfvars

# Add the source endpoint - it can be the IP or DNS
ec2_mysql_endpoint = "<source-endpoint>"

Create the infrastructure:

terraform -chdir='aws-dms' init
terraform -chdir='aws-dms' apply -auto-approve

Once done, connect to the console and check the connection tests.

https://sa-east-1.console.aws.amazon.com/dms/v2/home?region=sa-east-1#endpointList

If the endpoint connections tests are successful, replication is ready to start. Move to the DMS migration tasks blade and start the migrations.

https://sa-east-1.console.aws.amazon.com/dms/v2/home?region=sa-east-1#tasks

All tasks once started should run successfully:

Clean-up

Delete the infrastructure to avoid costs:

terraform -chdir='aws-dms' destroy -auto-approve
terraform -chdir='ec2-mysql' destroy -auto-approve

aws-dms-migration's People

Contributors

epomatti avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.