Lambda + RDS Postgres not working

0 votes

I'm trying to make rds with postgres work with lambda, but no luck so far. I've read all other threads about it here, double-checked my Lambda VPC + Subnet config, it's the same as the RDS one, but still no luck connecting, what am I missing here?

Some screenshots to clarify: enter image description hereenter image description hereenter image description here

Before, I enabled the Public access and I could connect through serverless offline.

Thanks!

EDIT ---- enter image description here

Sep 3, 2018 in AWS by bug_seeker
• 15,350 points
113 views

1 answer to this question.

0 votes
Have you verified your security group for your RDS service? It needs to allow access from the security groups given to your Lambda function. It is not enough that they are in the same VPC/subnets. The security group still needs to allow traffic on the ports for postgres (5432).

Note that for security groups you don't have to select an origin IP (which can be tricky for Lambda). But i notice you are giving your Lambda function the group sg-29aac25d. You can use that ID to give access to the RDS.

IAM policies should be irrelevant as you are authenticating against postgres. Unless your IAM doesn't allow your Lambda to execute, the problem is not IAM.
answered Sep 3, 2018 by Priyaj
• 56,520 points

Related Questions In AWS

+3 votes
3 answers
0 votes
1 answer
+1 vote
3 answers

Not able to pass params POST to AWS Lambda from Amazon API Gateway

For this template : application/x-www-form-urlencoded  This line below will ...READ MORE

answered Jun 13, 2018 in AWS by Cloud gunner
• 4,260 points
2,017 views
+1 vote
1 answer

How to load CSV data to RDS Aurora table using lambda?

Launch an Amazon RDS MySQL database engine ...READ MORE

answered Jul 26, 2018 in AWS by Priyaj
• 56,520 points
1,127 views
0 votes
1 answer

Migration on-premise Postgresql into AWS RDS

Actually the solution purposed works. But there's ...READ MORE

answered Aug 24, 2018 in AWS by Priyaj
• 56,520 points
223 views
0 votes
1 answer

Install postgreSQL on Ubuntu

Installing PostgreSQL on Ubuntu is very simple, ...READ MORE

answered Mar 22 in Database by Nitesh
43 views
0 votes
1 answer

Access progrs prompt without switching accounts

Use the following to get the postgres prompt ...READ MORE

answered Mar 22 in Database by Mahi
26 views
+1 vote
10 answers
+2 votes
3 answers