Database Upgrade Process
Follow these steps to upgrade the database:
Step 1: Prepare for Upgrade
Create a snapshot of your PostgreSQL 13 database before upgrading:
Using AWS Console
- Navigate to RDS Console → Databases
- Select your PostgreSQL 13 instance
- Click Actions → Take snapshot
- Enter snapshot name:
pre-upgrade-snapshot-YYYYMMDD
- Click Take snapshot
Using AWS CLI
aws rds create-db-snapshot \
--db-instance-identifier your-db-instance \
--db-snapshot-identifier pre-upgrade-snapshot-$(date +%Y%m%d)
Step 2: Upgrade RDS PostgreSQL to 16.9
Using AWS Console (Recommended)
- Navigate to RDS Console:
- Go to AWS Console → RDS → Databases
- Select Your Database Instance:
- Click on your PostgreSQL 13 database instance
- Modify Database Engine:
- Click the Modify button
- In the Engine options section, find Engine version
- Select 16.9 from the dropdown menu
- Review Modification Settings:
- Scroll down to Scheduling of modifications
- Choose Apply immediately for immediate upgrade, or
- Choose Apply during the next scheduled maintenance window
- Apply Changes:
- Click Continue
- Review the summary of modifications
- Click Modify DB instance
- Monitor Upgrade Progress:
- The instance status will show "modifying"
- Upgrade typically takes 10-30 minutes depending on database size
- Wait for status to return to "available"
Using AWS CLI
# Upgrade your RDS instance to PostgreSQL 16.9
aws rds modify-db-instance \
--db-instance-identifier your-db-instance \
--engine-version 16.9 \
--apply-immediately
Step 3: Download Required SSL Certificate
# Download the global CA bundle from AWS
wget https://truststore.pki.rds.amazonaws.com/global/global-bundle.pem
# OR using curl
curl -O https://truststore.pki.rds.amazonaws.com/global/global-bundle.pem
# Verify the certificate file
head -5 global-bundle.pem
# Should show: -----BEGIN CERTIFICATE-----