Migrating MySQL to PostgreSQL With the AWS Database Migration Service

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

The hands-on lab is part of this learning path

Ready for the real environment experience?

Time Limit1h 30m


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


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:


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
Learning paths2

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 the Developer - Associate, Sysops Administrator - Associate, and Solutions Architect – Associate AWS certifications.