Interview Prep/AWS/RDS, Aurora and DynamoDB

`FATAL: no pg_hba.conf entry for host "10.0.1.25", user "app", database "orders", no encryption`.

IntermediateTroubleshootingRDS, Aurora and DynamoDB
Answer

Likely causes → The parameter group sets rds.force_ssl=1 (the default for RDS PostgreSQL 15+), and the client connects without TLS. You cannot edit pg_hba.conf on RDS; it is controlled through parameters.

Diagnose →

aws rds describe-db-parameters --db-parameter-group-name pg16-app \
  --query "Parameters[?ParameterName=='rds.force_ssl']"

Fix →

  1. Connect with TLS: psql "host=... dbname=orders user=app sslmode=verify-full sslrootcert=global-bundle.pem"
  2. Download the CA bundle: curl -O https://truststore.pki.rds.amazonaws.com/global/global-bundle.pem
  3. Set sslmode=require or verify-full in the app's JDBC or driver URL

Prevent → Require TLS everywhere, and ship the RDS CA bundle in your base images.

aws All AWS questions Roadmap: AWS core services

More on RDS, Aurora and DynamoDB