Question: How do I resolve issues with an Amazon DocumentDB instance that is in an incompatible-network state?

My Amazon DocumentDB (with MongoDB compatibility) instance is in an incompatible-network state. What does this mean, and how can I fix it?Short DescriptionAn incompatible-network state indicates one or more of the following issues with the Amazon DocumentDB instance:There are no available IP addresses in the subnet that the Amazon DocumentDB instance was launched in.The subnet listed in the Amazon DocumentDB DB subnet group no longer exists in the Amazon Virtual Private Cloud (Amazon VPC).You reached your service quota for Elastic Network Interfaces in the AWS Region that you’re using, so you need to request a service quota increase.The original elastic network interface of the Amazon DocumentDB instance was deleted while the cluster was stopped. When the DB instance was restarted, the elastic network interface wasn't found.The incompatible-network state of your Amazon DocumentDB instance might be the result of performing one of the following actions:Modifying the Amazon DocumentDB instance’s class.Adding a new Amazon DocumentDB instance to the cluster.Replacing a host due to a maintenance event.Creating a new Amazon DocumentDB instance after the quota for the elastic network interfaces is reached.Restoring from an Amazon DocumentDB snapshot backup.Starting an Amazon DocumentDB cluster that was stopped.

ResolutionThe incompatible-network state means that the Amazon DocumentDB instance might still be accessible at the database level, but you can't modify or reboot the instance. For this reason, it's a best practice to always have a backup (snapshot or logical) so that you can restore the data to another instance, in case your instance enters an incompatible-network state.Open the Amazon DocumentDB console, and then choose Instances from the navigation pane.Choose the Amazon DocumentDB instance that is in an incompatible-network state, and then note the VPC ID from the instance details.Open the Amazon VPC console, and then choose Your VPCs from the navigation pane.Select the VPC that you noted previously, choose Actions, and then choose Edit DNS hostnames. If DNS hostnames isn't enabled, check the box for enable, and then choose Save.From Your VPCs, select the VPC that you noted previously, choose Actions, and then choose Edit DNS resolution. If the DNS resolution is not enabled, check the box for enable, and then choose Save.Choose Subnets from the navigation pane, and then confirm that all subnets in the subnet group used by the Amazon DocumentDB cluster have available IP addresses.Open the Amazon Elastic Compute Cloud (Amazon EC2) console, and then confirm that you haven't reached the quota for elastic network interfaces. Request a service quota increase, if needed.Note: The quota for network interfaces per AWS Region is 350 by default, or it's based on your on-demand DB instance quota multiplied by five, whichever is greater. For more information, see Network Interfaces.If Amazon DocumentDB instance is already in incompatible-network state, you can use either of the following methods for your Amazon DocumentDB cluster:Create a new Amazon DocumentDB instance in the cluster after resolving the issue that caused the incompatible-network state. After you have a running cluster with a new, active, and healthy Amazon DocumentDB instance, you can delete the instance that was in an incompatible-network state. Important: Don't delete the cluster entirely, and be sure that the new Amazon Document DB instance is active and running in the same cluster.Or, temporarily stop any writes to the Amazon Document DB instance, and then perform a point-in-time recovery (PITR) to create a new cluster.Related InformationMonitoring an Amazon DocumentDB Instance's Status