Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Its also possible to use postgresql-client software, e.g. psql. to connect to the db. To do one must use ssh or putty to create a tunnel (much like is done above). See Connect to a PostgreSQL Server via SSH Tunnel - DEV Community for help in doing so.

  1. Use appropriate pass-through (Bastion) servers with user ec2-user in ssh command

    1. Us-West-2: 52.13.131.147, ec2-52-13-131-147.us-west-2.compute.amazonaws.com

    2. US-East-1: 3.226.116.124, ec2-3-226-116-124.compute-1.amazonaws.com

  2. ssh -L localhost:5433:registration-b-20230614.cibwv8nm92hc.us-east-1.rds.amazonaws.com:5432 ec2-user@ec2-3-226-116-124.compute-1.amazonaws.com -i /home/ubuntu/.ssh/id_rsa.michael-fioprotocol.io

    1. Replace ‘ssh’ above with ‘ssh -o ExitOnForwardFailure=yes -f -N’ to put into background

    2. ssh -o ExitOnForwardFailure=yes -f -N -L localhost:5433:registration-b-20230614.cibwv8nm92hc.us-east-1.rds.amazonaws.com:5432 ec2-user@ec2-3-226-116-124.compute-1.amazonaws.com -i /home/ubuntu/.ssh/id_rsa.michael-fioprotocol.io

  3. Test using a command like; psql --port=5433 --host=localhost --user registration -c "SELECT * FROM public.wallet"

...