Hi Aditya, You need to change the $RDSHOST value you need to replace my “app_user” to your “testuser” and database “postgres” to your “testdb” [ec2-user@ip-172-31-13-121 ~]$ export RDSHOST="mypg.cfvvs1nh3f7i.ap-southeast-2.rds.amazonaws.com" [ec2-user@ip-172-31-13-121 ~]$ export PGPASSWORD="$(aws rds generate-db-auth-token \ --hostname $RDSHOST \ --port 5432 \ --username app_user)” [ec2-user@ip-172-31-13-121 ~]$ psql "host=$RDSHOST port=5432 sslmode=require dbname=postgres user= app_user" psql (11.5, server 12.3) WARNING: psql major version 11, server major version 12. Some psql features might not work. SSL connection (protocol: TLSv1.2, cipher: ECDHE-RSA-AES256-GCM-SHA384, bits: 256, compression: off) Type "help" for help. postgres=> Thanks, Hannah |