PSQLError error 1 on Lambda Function

We recently spun up a new production environment for a project that deploys Swift to lambda functions than connect to an Aurora RDS cluster.

Our application is single-tenant, so we have several other production environments with the same deployment (fully automated deployments).

In the newest environment, after attempting to connect to our database, we are seeing a "PSQLError error 1" error in our logs. The only difference between this environment and the others appears to be an upgrade in aurora engines on our newly created database. This environment is running Aurora 15.4 while others are back in 11 or 12.

From my understanding, this error is "failedToAddSSLHandler". My aurora instance has the ssl parameter set to 1 and rds.force_ssl set to 0. This is the same across all my environments.

I should also note that if I get my server running locally while pointing to the production database, this error does not occur and I can successfully connect to the database in the code.

Are any of you aware of what may be causing this issue? I'm banging my head against this one. Thank you so much in advance.

Are you sure the security groups on the DB are setup correctly?

Hi Tobias, and thanks for this. I'm quite sure, given it's the same setup as all our other environments. I also triple checked by putting eyes on it.

After going down a deep SSL rabbit hole between postgres/aurora versions we realized there a was a user configuration issue. The db user simply couldn't auth when connecting. The failedToAddSSLHandler error was very confusing. I will create a Github issue based on the PSQLError sending us in a weird direction.