ssh -L reaches a database that is only on the private network
The database allows connections from the bastion only. Tunnel through it and your local client thinks the database is on localhost.
ssh -N -L 5433:db.internal:5432 bastion
psql "host=localhost port=5433 dbname=app"-N runs no remote command, just the tunnel. Put it in ~/.ssh/config as a LocalForward line and it is one word.
shelloperations