How To

Access your database locally

Sometimes it can be useful to access your database locally to use a database GUI like TablePlus, for example.

AWS

To access a database on AWS locally, you will need the following.

First, you will need to download and configure the AWS CLI.

Next, you will need to use the AWS CLI and SSM Agent to access your database like so:

aws ssm start-session --target INSTANCE_ID --document-name AWS-StartPortForwardingSessionToRemoteHost --parameters '{"host":["RDS_PROXY_ENDPOINT"],"portNumber":["5432"], "localPortNumber":["5432"]}'
  • You can get the INSTANCE_ID from the EC2 console for the bastion Coherence made.
  • You can get the RDS_PROXY_ENDPOINT from the AWS console.
Previous
How much does it cost?