Lambda connect to RDS

I have read: Lambda Deploy into VPC and Issue | Connecting Lambda to RDS

I am getting further than both.

I have my lambda function setup with the security group, subnets, and the connection does not timeout.

But when I try to do the PG connect. I get an 3D00 error, which says that the db with name “ysgdb” is not found. But in RDS I see it is there and is public.

Any ideas where to go next?

# serverless.yml

service: lambdadb
  name: aws
  stage: dev
  region: us-east-2
  runtime: nodejs10.x
    # this is formatted as <FILENAME>.<HANDLER>
    handler: main.handler
        - sg-a1e6f4c3
        - subnet-53b45038
        - subnet-4a2a7830
        - subnet-1469d358
    - http:
        path: lambdadb
        method: post
        cors: true
    - http:
        path: lambdadb
        method: get
        cors: true

I don’t know why, but this is now working. So if the moderator could delete this thread, that would be fine. It does not allow me to do that.