0

I raised a similar question recently here which was resolved, however I've change the setup slightly.

The Nat Gateway was costing a small fortune so I switched it out for a Nat Instance using EC2. I followed this guide.

Now my Lambda is successfully connecting to both the RDS instance and also has internet connectivity which is great. The problem I now have is I'm unable to connect to RDS Postgres through port 5432 from my local machine and I'm a bit stumped.

Screenshots here, let me know if you need anything else.

Cheers!

Craig
  • 337
  • 2
  • 10
  • Your database is publicly accessible, which means it was assigned a public IP address, and the security group is wide open. The other details about NAT gateway/instances and Lambda functions shouldn't be relevant. How exactly are you trying to connect to the database? You should be able to connect directly to the server from your local machine using "Endpoint" value listed in the RDS console in your first screenshot. – Mark B Oct 13 '19 at 12:48
  • Hi @MarkB, if I telnet to the endpoint, e.g. `telnet gp1v1tm0xhkqdxz.cqivw2c1ezpb.eu-west-2.rds.amazonaws.com 5432`, I get: `Trying 3.10.84.97...` and then the connection eventually times out. – Craig Oct 13 '19 at 13:27
  • are you able to `ping gp1v1tm0xhkqdxz.cqivw2c1ezpb.eu-west-2.rds.amazonaws.com` ? – Sudhendu Oct 14 '19 at 13:27
  • Hey @Sudhendu - That causes a request timeout. – Craig Oct 14 '19 at 15:08
  • hello, have you solved the issue? – Farad Apr 16 '20 at 15:16

0 Answers0