It looks like you're seeing the issue described in the documentation - have you tried the remediation steps there?
The error message you're getting tells me that the Lambda function is connecting to the database correctly at a networking level; but the database is denying access based on its configuration.
The no encryption part of the error message is worth looking into, is PostgreSQL configured to force SSL for connections? https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/PostgreSQL.Concepts.General.SSL.html
If it is then the lambda code will need to enable SSL too.
Your IAM permissions issue kindly allow API Access, RDS Access.
- AWS OFFICIALUpdated a year ago
- How do I troubleshoot connection timeout errors from Lambda when trying to access an Amazon RDS DB instance?AWS OFFICIALUpdated 3 years ago
- EXPERTpublished 4 months ago