• Relational Database Service

rds
  1. Help Center
  2. Relational Database Service
  3. User Guide
  4. FAQs
  5. Connection and Access FAQs
  6. How Can I Configure a Security Group to Access RDS DB Instances?

How Can I Configure a Security Group to Access RDS DB Instances?

The following example illustrates how to configure a security group. In the example, the ECS IP address is 192.168.0.151 and the RDS connection address is 192.168.0.16:8635.

To access RDS DB instances through the ECS, add the outbound rule shown in Figure 1 to the ECS security group.

Figure 1 Configuring the ECS security group
NOTE:
  • In the outbound rule, set the IP address to the RDS DB instance IP address. The port number can be any port number because the outbound port is selected randomly.
  • To log in to the ECS, you also need to add an inbound rule to the ECS security group.

Add the inbound rule shown in Figure 2 to the RDS security group. Set the IP address to the used ECS IP address and the port to the RDS port.

Figure 2 Configuring the RDS security group