Home
Support Forums

MySQL Client Cert

I’m trying to connect to a MySQL DB from a Function.

Specifics:

  • TypeScript runtime
  • MySQL DB hosted by PlanetScale
  • TS client generated by Prisma

The client works fine locally, but can’t connect over TLS in the function.

My connection string is:

mysql://[redacted]:[redacted]@[redacted].us-east-1.psdb.cloud/[my-db|redacted]?sslmode=require&sslaccept=strict&sslcert=/etc/ssl/cert.pem

I have /etc/ssl/cert.pem locally and it’s no issue. The cert file doesn’t exist in the Lambda runtime.

  1. Where is the cert file?
  2. If that’s not the case, any other hints?

thanks

Hi @spxrogers,

Could you try to include the certificate file with the function bundle like this: