A DB Subnet Group in Amazon DocumentDB is a collection of subnets within a VPC, used to define which subnets the DocumentDB cluster can be deployed in. Each DB Subnet Group must contain at least two subnets in different Availability Zones (AZs) to ensure high availability and redundancy.
Select the right network in VPC: The DB Subnet Group helps define which VPC and subnets Amazon DocumentDB can use, allowing for better network control and enhanced security
Keep the system running: The database requires at least two subnets in different Availability Zones (AZs). If one AZ fails, the system can continue operating using the other subnet.
Automatic failover handling: If the primary instance fails, Amazon DocumentDB will switch to a replica instance in another subnet to ensure uninterrupted operation. A new replica will then be created in the original subnet to maintain the required number of nodes.
Follow these steps to create a DB Subnet Group on AWS:
Go to the AWS Management Console.
Search for and select the Amazon DocumentDB service.
In the navigation menu, select Subnet groups.
In Subnet groups, click Create.
In the Create DB Subnet Group page:
Name: blog-db-subnet-group
.
Description: blog-db-subnet-group
.
Select the VPC you are using.
Click Create to complete the DB Subnet Group setup.