Date context: January 31, 2026 (as provided)
I want to connect to my rds instance using psql I allowed all traffic still mo use
- Even with security group allowing all traffic, common blockers are:
- Publicly accessible = No
- Subnets lack route to Internet Gateway (0.0.0.0/0 → igw-…)
- Network ACLs blocking
- Local firewall/ISP blocking port 5432
- Wrong endpoint/port/credentials
- Diagnostic commands: ping, telnet/Test-NetConnection on port 5432
- Recommended psql example command provided
what if public access is disabled?
If Publicly accessible = No:
- Instance has only private IP — no direct public connection possible
- Options:
- Temporarily set to Yes (for dev/testing)
- Use EC2 bastion + SSH tunnel (most common secure method)
- Example SSH tunnel:
ssh -L 5433:endpoint:5432 ec2-user@ec2-dns - Then
psql -h localhost -p 5433 ...
- Example SSH tunnel:
- AWS SSM Session Manager port forwarding
- Client VPN / Site-to-Site VPN
- Other: EC2 Instance Connect Endpoint, etc.
- Recommendation: Use bastion/SSH tunnel for secure access without exposing DB
can we disable this ssl connection
Yes — controlled by rds.force_ssl parameter (default = 1 / on in PostgreSQL 15+)
Steps to disable:
- Create/edit custom DB parameter group
- Set rds.force_ssl = 0
- Associate with instance → Apply & reboot
- Connect with
PGSSLMODE=disableorsslmode=disable
Warnings:
- Security risk (unencrypted traffic)
- Better to keep enabled + use proper SSL (rds-ca bundle + verify-full)
- Example psql with disable provided
Internet access gateway Disabled is shown on my instance
"Internet access gateway: Disabled" means no route to Internet Gateway — subnets are private.
Fix options:
Option 1: Make public (for testing)
- Attach IGW to VPC (if missing)
- Add 0.0.0.0/0 → igw- route to subnet route table(s)
- Enable auto-assign public IP on subnets (optional)
- Ensure Public access = Yes on RDS
- Wait → status should change to Enabled
Security: Restrict SG to your IP only
Option 2: Keep private (recommended for prod)
- Launch EC2 bastion in public subnet
- Allow 5432 from EC2 SG to RDS SG
- Use SSH tunnel (example commands repeated)
- Keeps "Internet access gateway: Disabled" — which is secure
Recommendation: Add the IGW route if you want quick public access; otherwise use bastion.