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.
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.