Postgresql 10 Installation on Amazon AWS EC2 Instance for Checking RDS Cluster

In the course of setting up applications on AWS with RDS databases, it becomes useful to have a quick way of installing Postgres on any given EC2 instance in order to connect to a Postgres-based RDS using psql or any of the other Postgres utilities.

yum install https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7-x86_64/postgresql10-libs-10.17-1PGDG.rhel7.x86_64.rpm -yyum install https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7-x86_64/postgresql10-10.17-1PGDG.rhel7.x86_64.rpm -y

Now you can run something like which pg_restore or which pg_dump to see that you have these binaries installed.

That’s it. Now we can use the instance we installed on to run Postgresql dump and restore jobs to an RDS or Aurora cluster.

--

--