Managing Amazon DocumentDB Subnet Groups

    A subnet is a range of IP addresses in your Amazon VPC. You can launch AWS resources into a specified subnet. Use a public subnet for resources that must be connected to the internet. Use a private subnet for resources that won’t be connected to the internet. For more information about public and private subnets, see VPC and Subnet Basics in the Amazon Virtual Private Cloud User Guide.

    Each DB subnet group should have subnets in at least two Availability Zones in a given Region. When creating a DB cluster in a VPC, you must select a DB subnet group. Amazon DocumentDB uses that DB subnet group and your preferred Availability Zone to select a subnet and an IP address within that subnet to associate with your cluster. If the primary instance fails, Amazon DocumentDB can promote a corresponding replica instance to be the new primary. It can then create a new replica instance using an IP address of the subnet in which the previous primary was located.

    For information about creating your own VPC and subnets, see in the Amazon Virtual Private Cloud User Guide.