Intermittent (cert) failure when connecting to AWS RDS

CraiMacl_23588
New Contributor

I've just upgraded a bunch of jobs to 12.2 LTS runtime and now getting intermittent failures with the following message:

```

java.sql.SQLException: [Amazon](600000) Error setting/closing connection: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target.

```

We are using pyspark to connect (cross-account) to and RDS instance. This was working absolutely fine on runtime 7.3, and works some of the time on 12.2. However, some of our scheduled jobs are failing.

Waiting a while, restarting the cluster and retrying can make the job succeed.

I can see another couple of people have had the same issue:
* https://community.databricks.com/t5/warehousing-analytics/trying-to-connect-to-dbeaver-from-databric...

https://community.databricks.com/t5/data-engineering/the-driver-could-not-establish-a-secure-connect...

Any ideas what's going wrong?