AWS Classroomnotes 05/Jan/2022

Migration Lab Setup

  • Since we don’t have on-premises we will be simulating the on-premise
  • To Simulate On-premise
  • Database:
    • We will create a VM in any cloud (AWS/Azure)
    • Install Database Management System
    • Import some sample data into database
    • Now we will setup the migration to AWS using Database Migration Service where our target will be AWS Relational Database Services (RDS)
    • Scenarios:
    • mysql to AWS RDS
    • postgreSQL to AWS RDS
    • Source:
    • Any VM in AWS/Azure
    • Destination
    • AWS RDS
  • Server Migrations:
    • We will be create a VM in Azure with Windows Server 2016 and Hyper-V as hypervisor
    • Using Hyper-V we will create two virtual machines
    • Our target is to migrate these two virtual machines into AWS
    • Source:
    • Particular VM in Azure
    • Destination:
    • EC2 instance in AWS

Database Migration using AWS Database Migration Service

Source Environment Creation

  • In this step we will try to create an EC2 instance where we will install the mysql database and import some data into it.
  • mysql by default runs on 3306 port
  • Create an Ubuntu 20.04 EC2 instance (Simulated On-premise Database Instance)
    Preview
    Preview
    Preview
    Preview
    Preview
    Preview
    Preview
    Preview
    Preview
  • To connect to the ec2 instance ssh -i <path to pemfile> username@ipaddress
  • Refer Here for the steps to install mysql on ubuntu 20.04
  • After installing the mysql login into mysql shell
    Preview
  • Lets create a user for migration => awsmigration
  • Now Execute the following commands
create user 'awsmigration'@'localhost' Identified by 'MotherIndia@123';
GRANT ALL PRIVILEGES ON *.* TO 'awsmigration'@'localhost';
exit
  • Now login with awsmigration user
mysql -u awsmigration

Preview

Note

  • Creating an AWS Free tier account: Refer Here
  • Creating an EC2 instance: Refer Here
  • Softwares to be installed on your System:
  • Windows Refer Here
    • Git For Windows
    • Visual Studio Code
    • Window 10 +: Windows Terminal Refer Here
  • Mac:

    • Install homebrew Refer Here
    • Install git brew install git
    • Install visual studio code brew install --cask visual-studio-code
  • Ensure you stop the instances after usage if you need them later else terminate the instances.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About continuous learner

devops & cloud enthusiastic learner