HikariCP

Configure Hikari Connection Pool when using AWS RDS IAM

Posted on by  
Tom de Vroomen

Amazon Web Services offers a way to connect to a MySQL or PostgreSQL database without having a password, instead an authentication token can be used.
Within AWS this type of authentication is called RDS IAM.
Users don’t need to store an username and password and credentials don’t need to be stored in the database, which makes this a secure authentication method.

So, this makes it interesting to use this in your Spring Boot application. Spring Boot will use a HikariCP connection pool by default, but HikariCP 4.0.3 doesn’t support the use of authentication tokens.

So, how do I make this work within my Spring Boot application?

  1. Enable RDS IAM for your database

  2. Create a custom Hikari DataSource

  3. Update application properties

Continue reading →

shadow-left