escamil - Hugo deployed website

Rob's Menagerie (recipes and such)

Amazon RDS

Installing PostgreSQL using Amazon RDS

Time requirement: 10 mins

Create (free) AWS Account

AWS Provides “free tier” content for demo/student/develoment use linked here

While a credit card is required, no payments needed until generous “free tier” credits exhausted:
Hardware type: db.t4g.micro = $0.0160/hour
Storage: $0.08/GB-month (gp3) - SSD Storage

Alternatives to default PostgreSQL engine:

Postgres/Aurora provides 6x replication for storage, increasing performance/reliability
Amazon Redshift provides column-based queries for warehousing/DSS support

Deploy Postgres-17 install and expose ports

  1. Identify your closest “region” and select default will most likley be “United States (N. Virginia)” I choose “United States (Oregon)” because of hydropower & renewables
  2. Create VPN (virtual network) using “VPC and more” option leave all default options selected. No physical hardware chosen, so no cost incurred
  3. Navigate to Aurora and RDS to create database
  4. Click Create database
  5. Choose PostgreSQL > Engine Version > Free tier
  6. Enter Master password
  7. Select defaults except Virtual Private Cloud (VPC): use drop-down to select “project-vpc” or newly created option
  8. Public access: YES
  9. Under “Additional configuration” tab: enter Initial database name: “demo” (or any other value)
  10. At bottom: Create database

Database will take several minutes to deploy, and will provide an “endpoint” or DNS name
You will still need to whitelist your IP address(es) under VPC security groups

  • Select the security group associated with your newly created VPC most likely the last, or longest-named group ID
  • Edit inbound rules to add Postgres port 5432
  • Click “Add Rule” > Type > PostgreSQL > Source: My IP Optionally add description for todays date, as your IP may change or add a CIDR range, allowing your (/20) network access

Connection and further maintenance

In my example, I was provided the endpoint used to connect as:

psql -h database-1.cvf3het7fmyg.us-west-1.rds.amazonaws.com -U postgres -d demo

Additional Customization

Under Parameter groups, the default:postgres17 file can be updated to meet DevOps needs
It’s always recommended to have a parameter group per database for compatibility/customization.

Cleanup RDS resources

Using RDS console, select demo database and use “Actions” > Delete

  • disable “Create final snapshot” (no backup is required after deletion)
  • disable “Retain automated backups”

Deletion may take several minutes. Be sure to review Snapshots and Backups to avoid charges.
Amazon charges per minute instance is available, not startup/shutdown time
but you ARE charged for storage, which includes separate rate for backup/snapshots.

References

Last updated on 29 Apr 2025
Published on 29 Apr 2025