How to Connect to AWS RDS Database

This guide explains how to connect to any AWS RDS database instance or cluster.

1. Navigate to the RDS Console
  1. Log in to the AWS Management Console.

  2. Go to RDS → Databases.

  3. Select the database you want to connect to.


2. Gather Connection Details
  • Endpoint (host): Found under Connectivity & security → Endpoints.

    • Use the Writer endpoint for read/write operations.

    • Use the Reader endpoint for read-only queries.

  • Port: Found in the same section (depends on DB engine).

  • Username: Found under Configuration → Authentication.

  • Password: Stored in AWS Secrets Manager.


3. Retrieve the Password
  1. Open Secrets Manager in AWS.

  2. Find the secret associated with the RDS database(often under an “account” secret).

  3. Copy the password for the database user.


4. Ensure VPN Access
  • Make sure you are connected to the company VPN.

  • Without VPN, you may not be able to reach the database (if it is in a private subnet).


5. Connect from Client

Use the appropriate database client or CLI tool for your engine (e.g., mysql, psql, etc.) with the following parameters:

  • Host: <endpoint>

  • Port: <port>

  • Username: <username>

  • Password: <password>

  • Database name: <dbname> (if required)

Generic connection template:

<db_client> -h <endpoint> -P <port> -u <username> -p

For example

mysql -h your-db.cluster-xxxx.region.rds.amazonaws.com -P 3306 -u dbUser -p