RDS database instances should not be publicly accessible
This check looks at the PubliclyAccessible setting on each Amazon RDS database instance. The safe setting is off, so the instance gets no public address and is reachable only from inside your network.
Why it matters
When an RDS instance is publicly accessible, its endpoint resolves to a public IP address, so it can be reached from the internet if its security group allows it. A database in that position is exposed to password guessing and to any weakness in the database engine itself, and one permissive security group rule is all that stands between it and the open internet. Keeping databases in private subnets removes that exposure.
AWS explains how this works in Working with a DB instance in a VPC in the Amazon RDS User Guide.
How to check it yourself
In the AWS console open RDS > Databases, select an instance, and look at Connectivity & security; Publicly accessible should say No. For one region at a time, this read-only AWS CLI command lists every instance:
aws rds describe-db-instances \
--region <region> \
--query "DBInstances[].[DBInstanceIdentifier,PubliclyAccessible]" \
--output tableAny row with True needs review. The command only describes instances and changes nothing.
How to fix it
Make sure the instance sits in a DB subnet group made of private subnets, and that the applications that need it can reach it from inside the VPC, through peering, a transit connection or a VPN. Then in the console choose Modify on the instance, set Public access to Not publicly accessible, and apply. The CLI equivalent is:
aws rds modify-db-instance \
--db-instance-identifier <instance-id> \
--no-publicly-accessible \
--apply-immediatelyAlso review the instance's security group and remove inbound rules that allow the whole internet. ConfigCobra itself only reads your account through its assume-role access and never changes it.
What changes when you fix it
Clients that connect to the database over the internet lose access. That includes developers connecting from laptops, third-party analytics or reporting tools, and applications running outside the VPC. They need a private route, such as a VPN, a bastion host, AWS Systems Manager port forwarding, or running inside the VPC. The endpoint name stays the same, but it now resolves to a private address. Plan the change for a quiet window and test connectivity from each application first. ConfigCobra's remediation impact analysis shows the affected resources and identities for a failing control before you apply the fix.
Included in
| Benchmark | CIS ID | Profile |
|---|---|---|
| CIS Amazon Web Services Foundations v7.0.0 | 3.2.3 | Level 1 |
Check this on your AWS
ConfigCobra runs this check with every other control of the CIS Amazon Web Services Benchmarks, read-only.