Network access
A database cluster group for Aurora and its member clusters are in one AWS account and one AWS Region. The group has its own Amazon VPC and subnet layout. Adding a cluster to the group doesn't change the cluster's network settings, and each member cluster keeps its own subnets and security groups. For how to create a Amazon VPC, subnets, and a DB subnet group, see Amazon VPC and Amazon Aurora. With routing enabled, the group adds a routing endpoint in your Amazon VPC.
Each member cluster keeps its own DB subnet group. Member clusters don't have to share a DB subnet group with each other or with the routing endpoint.
Routing endpoint networking
The service serves the routing endpoint through interface Amazon VPC endpoints in your Amazon VPC. The routing endpoint isn't publicly accessible. To reach it from another Amazon VPC or from on premises, see Connectivity within a VPC.
When you enable routing with CreateDBClusterGroup or ModifyDBClusterGroup, you set the routing endpoint's network settings in RoutingEndpointConfiguration. The following table lists the settings.
| Setting | Required when you enable routing | Default | Description |
|---|---|---|---|
VpcSubnetIds |
Yes | None | Subnets that your account owns, in at least two Availability Zones of one Amazon VPC, with one subnet in each Availability Zone. You can supply at most one subnet for each Availability Zone in the AWS Region. The routing endpoint uses only these Availability Zones. |
VpcSecurityGroupIds |
No | The default security group of the Amazon VPC | Up to 5 security groups that control traffic from your applications to the routing endpoint, in the Amazon VPC of the subnets. They don't control traffic from the routing endpoint to member clusters. |
NetworkType |
No | IPV4 |
The address family of the routing endpoint: IPV4, IPV6, or DUAL. Every subnet that you supply must support it. |
The routing endpoint listens on the engine's port, 3306 for Aurora MySQL. You can't set the port. describe-db-cluster-groups returns it in RoutingEndpointConfigurationInfo.Port.
The following rules apply to these settings:
-
If you enable routing, reserve two free IP addresses in the group's subnets. Routing creates two Amazon VPC endpoints, which use two IP addresses for each group. A group without routing doesn't need them.
-
While routing is on, you can't change the subnets, the security groups, or the network type of the routing endpoint. Choose them, and with them the Availability Zones of the routing endpoint, before you enable routing.
-
While routing is on, a call that changes
VpcSubnetIdsorNetworkType, or that suppliesVpcSecurityGroupIds, fails with anInvalidParameterCombinationerror. A call that sends the current subnets or network type again succeeds and changes nothing. -
If you supply these settings and don't enable routing, the call fails with an
InvalidParameterCombinationerror. This includes the call that disables routing, so leave them out of that call. When you disable routing, the group removes these settings.
RoutingEndpointConfiguration also carries the routing endpoint parameters. For those, and for the create and modify procedures, see Configuring the routing endpoint and Creating, modifying, and deleting a database cluster group for Aurora.
For DUAL, each subnet needs an IPv4 CIDR block and an associated IPv6 CIDR block. For IPV6, each subnet must be IPv6-only. The network type doesn't require any setting on the member clusters.
Connectivity within a VPC
When you enable routing, the service provisions the routing endpoint as AWS PrivateLink interface Amazon VPC endpoints in your Amazon VPC and subnets. There is a single routing endpoint, and you can see it in the Amazon VPC console. The routing endpoint isn't publicly accessible. Direct member cluster endpoints keep their own networking.
To choose the subnets and security groups, use --routing-endpoint-configuration in the call that enables routing: create-db-cluster-group for a new group, or modify-db-cluster-group for an existing group. The following AWS CLI commands show both operations.
aws rds create-db-cluster-group --regionREGION--db-cluster-group-identifierGROUP_IDENTIFIER\ --engine aurora-mysql --enable-routing --admin-usernameADMIN_USER\ --routing-endpoint-configuration '{"VpcSubnetIds":["SUBNET_1","SUBNET_2"],"VpcSecurityGroupIds":["SECURITY_GROUP"]}' \ --cli-input-json file://group-admin-password.json aws rds modify-db-cluster-group --regionREGION--db-cluster-group-identifierGROUP_IDENTIFIER\ --enable-routing --admin-usernameADMIN_USER\ --routing-endpoint-configuration '{"VpcSubnetIds":["SUBNET_1","SUBNET_2"],"VpcSecurityGroupIds":["SECURITY_GROUP"]}' \ --cli-input-json file://group-admin-password.json
describe-db-cluster-groups returns the routing endpoint's Amazon VPC, subnets, and security groups, with its status, port, network type, and DNS name. Applications connect with the DNS name in Endpoint. Don't use the names of the underlying Amazon VPC endpoints (vpce-). To read these fields, run the following AWS CLI command. In the output, the IDs are examples, region and domain are placeholders, and the Parameters value is shortened.
aws rds describe-db-cluster-groups --db-cluster-group-identifier my-group \ --query 'DBClusterGroups[0].RoutingEndpointConfigurationInfo' { "VpcSubnetIds": [ "subnet-0abc1234example", "subnet-0def5678example" ], "VpcSecurityGroupIds": [ "sg-0abc1234example" ], "Port": 3306, "NetworkType": "IPV4", "Status": "available", "Endpoint": "my-group.clustergroup-abcdefgh.region.domain", "VpcId": "vpc-0abc1234example", "Parameters": { ... } }
Routed statements run on each member cluster's writer. To read from replicas, connect directly to a member cluster's reader or instance endpoints.
Clients reach the routing endpoint in the following ways:
-
From the same Amazon VPC. Applications use the endpoint DNS names directly.
-
From another Amazon VPC or on premises. Clients reach it as they reach any interface Amazon VPC endpoint, through Amazon VPC peering, Transit Gateway, VPN, or Direct Connect, and security groups and route tables apply. For more information, see Access an AWS service using an interface VPC endpoint, What is VPC peering?, and What is a transit gateway?
RDS Proxy endpoints work the same way. For more information, see Working with Amazon RDS Proxy endpoints.
You can't add routing endpoints in other Amazon VPCs. The routing endpoint stays in the Amazon VPC of the routing endpoint subnets. To reach it from another Amazon VPC, use the preceding connectivity options.
Security group rules
Set the following rules so that your security groups allow each hop of a routed connection:
-
The routing endpoint's security groups allow inbound TCP on the routing endpoint's port from your application hosts and SQL hosts. We recommend that these rules name the security groups of those hosts as the source.
-
The member clusters' security groups allow inbound TCP on the member cluster's port from hosts that connect directly.
-
Client hosts allow outbound traffic to the routing endpoint's Amazon VPC endpoints.
If your applications connect through the routing endpoint, we recommend that only your change pipeline and administrator hosts connect to member clusters directly. A direct change is then a deliberate step. A direct connection doesn't go through the routing layer, so routing layer privileges and router user host parts don't apply to it. To stop traffic from one client IP address to the routing endpoint, add a deny rule to the network ACL of the routing endpoint's subnets.
Routed traffic doesn't pass through the security groups of your member clusters. The routing layer reaches member clusters through a network that AWS manages. Member cluster security group rules apply only to direct connections.
Finding the routing endpoint's Amazon VPC endpoints
To scope an egress allowlist, a firewall rule, or monitoring, read the routing endpoint's networking from the group.
To find the routing endpoint's Amazon VPC endpoints
-
With the AWS CLI, read the routing endpoint's Amazon VPC, subnets, security groups, and DNS names.
aws rds describe-db-cluster-groups --regionREGION--db-cluster-group-identifierGROUP_IDENTIFIER\ --query 'DBClusterGroups[0].RoutingEndpointConfigurationInfo.{VpcId:VpcId,Subnets:VpcSubnetIds,SecurityGroups:VpcSecurityGroupIds,Endpoint:Endpoint}' -
To see the interface endpoints, their state, and their metrics, open the Amazon VPC console, choose Endpoints, and filter by the
VpcIdfrom the preceding step.
The service creates these Amazon VPC endpoints in your account with the security groups from RoutingEndpointConfiguration. If you don't give security groups, they use the default security group of the Amazon VPC. While routing is on, you can't change the security groups through RoutingEndpointConfiguration.
For Amazon VPC endpoint metrics, see Monitoring database cluster groups for Aurora. For connection errors such as timeouts, see Troubleshooting connection and sign-in problems.