Lab 2 - Promote Read Replica

Overview

In this lab you will take the RDS PostgreSQL database that was created in the Preparation step, and create a replica of it on a Graviton instance. The replica can then be promoted from a read replica of the initial database to a new independent database.

This works for non-Aurora databases, Lab 3 will cover how to migrate Aurora databases.

This migration method will create a new database with different endpoints. Any database connections will need to be modified to use the new endpoints. The existing database is not affected. Note that is possible to run database instances on multiple different server types and sizes.

Create a Graviton read replica

  1. Check that the postgresql-lab2 database is in the Available status Lab 2 Instance Available
  2. In the RDS database console click on the radio button next to postgresl-lab2
  3. From the actions menu select Create Read Replica Lab 2 Instance Available
  4. In Instance Specifications select a graviton instance type (e.g. db.t4g.micro) Lab 2 Instance Available
  5. Scroll down to Settings and enter a DB Instance Identifier (e.g. lab2-graviton) Lab 2 Instance Available
  6. Leave other settings at default, scroll down and click Create read replica
  7. Wait for the new replica instance to reach the Available status in the Databases console, this will take a few minutes. Click the refresh button to update the status.

Promote the Graviton replica to a new database instance

  1. When its status is Available, click on the radio button next to the lab2-graviton instance
  2. From the actions menu select Promote Lab 2 Database Promotion
  3. Disable the automatic backups and click Promote Read Replica Lab 2 Database Promotion
  4. The replica will now restart as a separate standalone instance. While it maintains its original endpoint name it is no longer linked to the original database, they are independent
  5. You will notice in the console, the promoted instance will leave the postgresql-lab2 cluster and become a standalone instance. When the lab2-graviton database has reached Available status the lab is complete. Lab 2 Database Promotion