RDS database reachable from the internet
An RDS instance with 'Publicly accessible' on gets a public endpoint. Combined with a security group open to 0.0.0.0/0, your database is directly reachable from the internet.
Why it matters
A database open to the internet is a top-value target: one weak password or a known engine CVE is a direct path to all of your data.
Public database endpoints are enumerated and brute-forced around the clock. There is almost no legitimate reason for a production database to have a public endpoint.
How to check for it
- In the RDS console, open the instance → Connectivity & security and check 'Publicly accessible'.
- aws rds describe-db-instances --query "DBInstances[?PubliclyAccessible].DBInstanceIdentifier".
- Also check the attached security group — 'Publicly accessible' only matters when a security group also allows the port in.
How to fix it
- Turn off 'Publicly accessible' (RDS → Modify → Connectivity) and reach the database from inside the VPC only.
- Tighten the security group so the database port is open only to your application's security group, never 0.0.0.0/0.
- For access from outside the VPC, use a bastion, a VPN, or AWS Systems Manager — never a public endpoint.
SkyShield checks this automatically
Connect your AWS, Cloudflare, GitHub, GitLab, Hetzner or DigitalOcean account read-only and SkyShield flags this across every account and region, with the fix in plain words — alongside the agent that watches your servers. Start free.
FAQ
- Why is a public database worse than a public web server?
- A web server is designed to be public and is hardened for it. A database holds everything at once and is usually only hardened for internal access, so exposing it removes your main layer of defence.