I've got a postgres db in a private subnet that I'm trying to access from a flask app running locally. The DB was previously publicly accessible, and I've just put it in the subnet to restrict access. I've set up a jump host for ssh tunneling, and I'm able to connect to the jump host and, using dbeaver, to the RDS instance.
Postgres uses port 5432 by default, and my RDS instance is no exception. But I have a process running on 5432 locally, so I am trying to use another port (5555) and have that traffic sent to 5432 on RDS. I run ssh on my local to send requests on the postgres port through the jump server. My command looks like
ssh -NL 5555:<rds_instance_dns>:5432 ec2-user@<jump_host_ip> -i ~/.ssh/<pk_filename>
I was previously able to connect to my RDS with my local app server when it was publicly accessible, but now I can't, though I've updated the db uri to point at <rds_instance_dns> and using port 5555. Is there something I'm missing?
Tried connecting to the db w/ my app server; was expecting to be able to connect; instead, it times out.