Run the following terminal command:
ssh -N -L 1234:<AWS-RDB-INSTANCE-NAME>:5432 ubuntu@<AWS-HOST> -i <PATH-TO-LOCAL-PEM> |
For example:
ssh -N -L 1234:some-db.slkfjelijfs.us-east-1.rds.amazonaws.com:5432 ubuntu@924.842.92.44 -i ~/.ssh/OLMISEnvDockerHost.pem |
This will open a connection to the AWS host and then create a tunneled connection via the AWS host to the RDB server running over the specified port (1234 in the example given). You should then be able to connect to the database using the username and password defined in the environment file for the specified instance.