Method to Manually Update Data in an AWS RDS Instance

Bahadir Balban

Buzz Founder

@buzzdevelopers

Here is a quick guide to doing quick updates on your PostgreSQL RDS database instance running in the AWS cloud, accessible from your Elastic Beanstalk (EBS) environment.

As a best practice you must be able to manage having no SSH access to your production instances. So this is really meant as an emergency hack, or a way to edit your test databases. Here we go.

You must first enable SSH access to your EBS instance, via:

eb ssh


Once you have logged in:

sudo yum install postgresql

Don’t mind the name postgresql, this will only install client tools on your instance, and not another postgres server, which is represented by a different package, postgresql-server.

Assuming you are running a standard Amazon AMI, this will install the tool psql.

Now open up your RDS instance page in the AWS console, and find out what you used for the host name, port, database name and user name, and type them when invoking psql:

psql --host=xx0a19uvxnmn9op.da8c88asdf0t.us-east-2.rds.amazonaws.com --port=5432 --username=test --dbname=mydbname

Enter your password when prompted, and that’s it! Now you can edit your database, e.g. start by running:

SELECT * from “Customers”;

The more convenient alternative to doing this is to install an admin panel. One of the options you have with Node.JS is express-admin. This is convenient in the sense that you can access the entire database and manipulate it through a web interface. However there are issues with this approach:

  • You or your engineers will have access to your entire database, including information that some of your users might consider private.

  • Your entire database security relies on your admin interface username and password.




Join The Discussion