hands-on lab

Migrating MySQL to PostgreSQL With the AWS Database Migration Service

Beginner
1h 30m
2,535
4.6/5
Get guided in a real environmentPractice with a step-by-step scenario in a real, provisioned environment.
Learn and validateUse validations to check your solutions every step of the way.
See resultsTrack your knowledge and monitor your progress.
Lab description

AWS Database Migration Service (DMS) is used to transfer data and database applications between different database instances. When migrating data the source and the target databases can use the same database engine, or they can be different engines. The primary use-case for DMS is to enable and support one-time large-scale migration activities.

A secondary use-case is for frequent or long-term replication tasks. Using DMS, a migration process that would previously have involved an outage or a risky and sudden switching of instances can be avoided. Instead, setting up real-time replication across different database instances allows for migration activities to happen more slowly, in smaller steps, and with validation being performed at each stage.

In addition, DMS can also be used for indefinite backup tasks. This is usually more costly than traditional database backup strategies (periodic snapshotting for example), but when the volume of data is very big, or real-time backups are a requirement, DMS is often the most effective and efficient solution. 

In this lab you will use DMS to migrate data from a database instance running the MySQL engine to an instance running the Aurora PostgreSQL engine.

Learning Objectives

This is a beginner level lab, upon completion of this lab you will be able to:

  • Configure source and target endpoints in DMS
  • Run a migration task in DMS
  • Connect to MySQL and PostgreSQL databases from the command-line
  • Generate a pre-migration task assessment in DMS

Intended Audience

This lab is intended for:

  • AWS Database Administrators 
  • Cloud Engineers

Prerequisites

You should have a conceptual understanding of:

  • Amazon RDS
  • SQL and Databases

The Database Fundamentals for AWS course can be used to fulfill the prerequisites.

Familiarity with AWS S3 and the Linux command-line will be beneficial but is not required.

The following labs can be used to learn more about AWS S3 and the Linux command-line:

Updates

March 21st, 2024 - Resolved deployment issue

October 30th, 2023 - Updated the instructions and screenshots to reflect the latest UI

May 22nd, 2023 - Resolved an issue that caused the lab to fail to setup on rare occasions

November 16th, 2022 - Updated instructions and screenshots to match UI

September 14th, 2021 - Updated the instructions to reflect the latest console experience

July 31st, 2020 - Updated lab to work with pre-migration assessments

Environment before
Environment after
About the author
Avatar
Andrew Burchill
Labs Developer
Students
66,016
Labs
163
Courses
2
Learning paths
4

Andrew is a Labs Developer with previous experience in the Internet Service Provider, Audio Streaming, and CryptoCurrency industries. He has also been a DevOps Engineer and enjoys working with CI/CD and Kubernetes.

He holds multiple AWS certifications including Solutions Architect Associate and Professional.

Covered topics
Lab steps
Logging In to the Amazon Web Services Console
Creating the Source Endpoint
Connecting to the Virtual Machine using EC2 Instance Connect
Populating the Source Database
Creating the Migration Task
Running the Migration Task
Verifying the Migrated Data