If your applications are running on an ECS that is in the same region as your RDS DB instance, you do not need to bind an EIP to the DB instance.
If your applications are running on an ECS that is not in the same region as your RDS DB instance or on a platform other than the public cloud, you need to bind an EIP to the DB instance.
- ECSs and RDS can communicate with each other only if they are in the same region, even if they are in different AZs.
- By default, a newly created DB instance is not bound with an EIP.
You can use a floating IP address or an EIP to access DB instances.
- Use an EIP alone when:
- Your applications are deployed on an ECS that is not in the same region as RDS.
- Your applications are deployed on a platform other than the public cloud.
- Before accessing the database, you need to add specific IP addresses or IP segments to the inbound rule. For details, see section Creating a Security Group.
- Binding EIPs to DB instances reduces the security of DB instances. Therefore, exercise caution when performing this operation. To achieve a higher transmission rate and security level, you are advised to migrate your applications to the ECS that is in the same region as RDS.
Binding an EIP
- On the Instance Management page, click the target DB instance.
- On the EIPs page, click Bind EIP.
- In the displayed dialog box, all unbound EIPs are listed. Select the EIP to be bound and click OK. If no available EIPs are displayed, click View EIP and assign an EIP on the VPC console.
- On the Basic Information page, you can view the EIP that has been bound to the DB instance.
To unbind the EIP from the DB instance, see Unbinding an EIP.
Unbinding an EIP
- On the Instance Management page, click the DB instance that has been bound with an EIP.
- On the EIPs page, click Unbind.
- Click Yes.
To bind an EIP to the DB instance again, see Binding an EIP.