If you see the following error without SSL:
java.sql.SQLException: [Amazon](500150) Error setting/closing connection: no pg_hba.conf entry for host "x.x.x.x", user "user", database "database", SSL off.
then the following error with SSL enabled:
java.sql.SQLException: [Amazon](500150) Error setting/closing connection: General SSLEngine problem.
You can try appending
sslfactory=org.postgresql.ssl.NonValidatingFactory
to the connection URL to fix the problem.