Kong 3.2.2 with Postgresql 15.5


I’m running Kong 3.2.2 OSS as a docker container in ESC task in AWS and is in the process of upgrading the DB. Earlier I was using using AWS RDS 13.10, then it was upgraded to 14.10 and now I’m trying to upgrade it to using 15.5, with default values. Kong is not running with this new version 15.5 and is giving the following error message:
nginx: [error] init_by_lua error: /usr/local/share/lua/5.1/kong/init.lua:588: [PostgreSQL error] failed to retrieve PostgreSQL server_version_num: FATAL: no pg_hba.conf entry for host "x.x.x.", user "kong", database "kong", no encryption

Does anyone has any advice for this. Thanks!