Step by step create AWS RDS Replica – Cross AZ and Cross Region

In this post, I would like to demo usage of AWS managed RDS, and how to setup Cross AZ and Cross region replication.

After that, I will test out the performance of this setup.

  • Select Asia Pacific Singapore Region
  • Create a new VPC and specify CIDR
  • Create 2 subnet under:
    • ap-southeast-1a
    • ap-southeast-1b
  • Create 2 EC2 instances under each subnet
  • Create a RDS service – MYSQL, under this new VPC, and one of the subnet.
  • Repeat the same setup in Asia Pacific Tokyo.
  • Create a replica from RDS created in step 5.
  • You will hit an error here:
    • The parameter DBInstanceIdentifier must be provided and must not be blank. (Service: AmazonRDS; Status Code: 400; Error Code: InvalidParameterValue; Request ID: 1eab1af5-5e54-46ef-b059-ecf11edfce53)
  • Now, we need to setup an encryption key in Tokyo VPC.
  • Switch to Region Tokyo.
  • Search for KMS server, inside, click on create key.
  • Assign Key administrators as AWSServiceRoleForRDS
  • Assign Key users as AWSServiceRoleForRDS
  • Go back to Singapore Region, re-start the replica creation. In Encryption section, select Master key as the new key just created in Tokyo Region. Now it works.
  • Now switch to Tokyo region and create same subnet and ec2 instances.
  • After these steps, we have below setup and ready for some tests.

Will explain performance testing in next post.


Add a Comment