but keycloak tries to login to localhost:5432
org.postgresql.Driver] (agroal-11) Connection error: : org.postgresql.util.PSQLException: Connection to localhost:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
Reading Configuring the database - KeycloakKC_DB_URL_HOST should template the jdbc connection string, but you’re setting an entirely new jdbc string. Does it log any parsing and fallback errors?
I’d either try to set KC_DB_URL_HOST to xxxxx.xxxxx.xxxxx.rds.amazonaws.com or just use KC_DB_URL as jdbc:postgresql://xxxxx.xxxxx.xxxxx.rds.amazonaws.com/keycloaxxxdb