CNAME DNSrecord for your domain to the endpoint reserved for your PostgreSQL Server, take this screenshot for reference.
/etc/postgresql/12/main/postgresql.confwith few of the newer parameters.
postgresql.confpath, You can find it with the following command.
postgresql.conffile and change it like so.
pg_hba.confis in the same path as
postgresql.conffile, you will need to allow external connections by adding the following lines.