EC2 connecting to Heroku Postgres

I’m trying to get metabase running on EC2 (which I did following the tutorial so kudos for that). However I’m not able to get the running instance to connect to a Heroku Postgres instance. I can do it locally via the mac app.

It just times out when trying to connect. I’ve tried adding the ssl and ssl.factory jdbc params but that doesn’t seem to help.

Anyone have any tips? I suspect it’s EC2 not connecting heroku properly? I don’t see anything in the heroku logs to indicate even an attempt.