Proxying a Postgres connection
This works for me.
You say the ssh command is trying to connect to port 22.  That is what it should be doing, in the absence of -p telling it to do otherwise.  It connects to port 22 on host 123.45.67.89 to set up the tunnel.  If 123.45.67.89 runs its sshd on a nonstandard port, then you need to specify it with -p.
Once that is done, then connections to localhost:42042 on the same machine where you ran the ssh command (your aws node) will get routed through 123.45.67.89 and on to psql.example.com on port 5432.