회사에서 사용하는 RDS 인증서가 만료되었다. 과거에 생성된 RDS 인스턴스들은 2019년 버전의 인증서를 사용하고 있었고, 현재는 2061년 버전으로 업데이트되어 있다. 인증서 만료로 인해 다음과 같은 에러가 발생했다:
Caused by: java.sql.SQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.
...
Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
...
Caused by: javax.net.ssl.SSLHandshakeException: NotAfter: Fri Aug 2302:08:50 KST 2024
...
SSL/TLS 인증서 교체 - Amazon Relational Database Service
Amazon Web Services(AWS) 문서는 AWS 클라우드에서 Amazon Relational Database Service(Amazon RDS)를 사용하여 관계형 데이터베이스를 설정, 운영 및 확장하는 데 도움이 됩니다. Amazon Aurora, MariaDB, Microsoft SQL Server, MySQL, Oracle 및 PostgreSQL을 실행하는 DB 인스턴스를 생성할 수 있습니다.
에서 확인할 수 있다.
Amazon RDS 인증 기관 인증서 rds-ca-2019는 2024년 8월에 만료될 예정입니다. RDS DB 인스턴스 또는 다중 AZ DB 클러스터에 연결하기 위해 인증서 확인과 함께 보안 소켓 계층(SSL) 또는 전송 계층 보안(TLS)을 사용하거나 사용할 계획이라면 새 CA 인증서인 rds-ca-rsa2048-g1, rds-ca-rsa4096-g1 or rds-ca-ecc384-g1 중 하나를 사용하는 것을 고려하세요. 현재 인증서 확인과 함께 SSL/TLS를 사용하지 않는 경우에도 CA 인증서가 만료되었을 수 있으며, 인증서 확인과 함께 SSL/TLS를 사용하여 RDS 데이터베이스에 연결하려는 경우 새 CA 인증서로 업데이트해야 합니다.