3
votes

considering the statement :

When adding an RDS instance to VPC, there needs to be three subnets in the subnet group across three different AZs for that VPC

what is the difference between three subnets and AZs here?

I know that we need AZs for any RDS instance and it is created automatically by amazon at deployment time. So, this of course means that there should be one subnet in each three AZs to enable access to RDS replicas and instances. Or it means that each AZ should have three subnets created within to enable that?

2
By default, in your default VPC, you have three subnet, one by AZ. If you create your own VPC, make sure to create, in this new VPC, at least 3 subnet, one on each AZ. To summarize, you need 3 subnet, one by AZ.Olivier
One is for the Multi-AZ, which is optional, but let's count it. One is for the RDS instance itself. So, two Subnets two AZs so far. what is the third?Sam

2 Answers

4
votes

You can have as many Subnets as you like in each AZ. By default AWS creates one VPC containing one Subnet in each AZ. The number of AZ varies from region to region.

The quote you gave in your question is saying that you must have three subnets, that these three subnets must all be be in different AZ but all three subnets must be in the same VPC.

3
votes

Amazon provides 99.95% RDS availability

Multi-AZ configurations for MySQL, MariaDB, Oracle, and PostgreSQL are covered by the Amazon RDS Service Level Agreement ("SLA"). The RDS SLA affirms that AWS will use commercially reasonable efforts to make Multi-AZ instances of Amazon RDS available with a Monthly Uptime Percentage of at least 99.95% during any monthly billing cycle.

In order to achieve that database has to be replicated in three different AZ. That is the reason why Amazon requires three subnets in three AZ. The relationship is:

  • The region has more than one AZ
  • AZ belongs only to one region
  • AZ has more than one data center
  • AZ can have more than one subnets. However, there is a soft limit of 200 subnets per AZ. You can ask Amazon for more than 200 if you need.
  • Subnet belongs only to one AZ
  • VPC belongs only to one region. You can have more than one VPC per region. However, there is a soft limit of 5 VPCs per region. You can ask Amazon for more than 5 if you need.
  • VPC can span more than one AZ.