Updated on 2024-04-13 GMT+08:00

Connecting to a DB Instance Through a Private Network

Process

Figure 1 illustrates the process of connecting to an RDS for PostgreSQL DB instance through a private network.

Figure 1 Connecting to a DB instance through a private network
  • Step 1: Create a DB instance. Confirm the specifications, storage, network, and database account configurations of the RDS for PostgreSQL DB instances based on service requirements.
  • Step 2: Configure security group rules.
    • If the ECS and RDS DB instance are in the same security group, they can communicate with each other by default. No security group rule needs to be configured. Go to Connecting to a DB Instance Through psql.
    • If the ECS and RDS DB instance are in different security groups, you need to configure security group rules for them, separately.
      • RDS DB instance: Configure an inbound rule for the security group with which the RDS DB instance is associated.
      • ECS: The default security group rule allows all outgoing data packets. In this case, you do not need to configure a security rule for the ECS. If not all outbound traffic is allowed in the security group, you need to configure an outbound rule for the ECS.
  • Step 3: Connect to a DB instance through a private network. The CLI tool psql is used as an example to describe the connection method.