Why Might Cross-Availability Zone (AZ) charges might apply??

0

Cross-Availability Zone (AZ) charges might apply The RDS database MYSQLDB (us-east-2a) and EC2 instance MYAWSINSTANCE (us-east-2c) are in different AZs. Cross AZ charges might apply.

I don't understand how this happened, I used the AWS wizard when creating everything. Is there a way to move my database to the same zone as my instance? Thanks for any help.

2 Answers
1
Accepted Answer

When you provisioned the RDS database did you select the option to Connect to an EC2 compute resource Set up a connection to an EC2 compute resource for this database https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/option2-task2-create-rds-database.html

If you selected this at the start then the rest of the wizard would have greyed-out a lot of options around VPC, DB subnet group, and Availability Zone and more-or-less forced the database to be created in the same AZ as your existing EC2 instance.

If this wasn't selected at the start then the database will have been provisioned randomly into a subnet within the default DB subnet group, which basically comprises a subnet in each AZ for the VPC.

If the chosen subnet is in a different AZ to the subnet your EC2 is in, then if you try and make a connection between the two later, any data transferred will be charged.

Take a look at the section Workload components in same AWS Region of https://aws.amazon.com/blogs/architecture/overview-of-data-transfer-costs-for-common-architectures/ for a fuller explanation of what's in-scope of being charged, and what isn't, in various scenarios.

@Riku's suggestion of enabling multi-AZ, failing over to a subnet in the desired AZ, and the shrinking the config back to single-AZ would work and would be a good learning exercise to undertake, but if you are trying to stay within free tier it would be outside the scope of that. If this is just a freshly-created empty database with nothing of value in it then consider deleting and recreating in a subnet within the appropriate AZ.

profile picture
EXPERT
Steve_M
answered 8 months ago
  • Got it. I'll get this knocked out this week. Much appreciated. Thanks

1

Hello.
Enable the multi-AZ setting in RDS.
After enabling, the availability zone can be moved by performing a failover in RDS.
After moving the availability zone, disabling the multi-AZ will return to the single-AZ configuration.
The procedure can be done in a manner similar to the following document.
https://repost.aws/knowledge-center/rds-move-to-private-subnet

profile picture
EXPERT
answered 8 months ago
  • Thank you for the information. Since as @Steve_M pointed out I am trying to stay n the free tier and my DB is basically empty. I will save your suggestion for another day. I'll follow hos suggestion this time and just delete and start a new db associated with the instance in the same zone. Thanks again!!

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions