---
title: RDS databases should not be publicly accessible
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: >-
  Docs > Datadog Security > OOTB Rules > RDS databases should not be publicly
  accessible
---

> For the complete documentation index, see [llms.txt](https://docs.datadoghq.com/llms.txt).

# RDS databases should not be publicly accessible
 
## Description{% #description %}

It is important to ensure that RDS database instances provisioned in your AWS account restrict unauthorized access to minimize security risks. Publicly accessible RDS instances can expose your database to anyone on the internet, increasing the risk of malicious activities such as brute force attacks, SQL injections, or DoS/DDoS attacks. Disabling the Publicly Accessible flag and updating VPC security group settings prevents public access to these instances and protects sensitive data.

This rule fails when Datadog determines that an instance is reachable from the internet: its Publicly Accessible flag is set, it is in a public subnet, and a security group allows inbound traffic from the internet. An instance whose reachability has not been computed also fails. An instance with the flag set passes if it is not in a public subnet or if no security group allows inbound internet traffic. This is an intentional deviation from CIS 7.1.0, which treats an instance with the Publicly Accessible flag set to Yes as insecure and also audits subnet routing.

## Remediation{% #remediation %}

For instructions on securing RDS instances by disabling public access, refer to [Working with RDS Instances in a VPC](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.WorkingWithRDSInstanceinaVPC.html).

## References{% #references %}

- [Working with RDS Instances in a VPC](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.WorkingWithRDSInstanceinaVPC.html)
- [CIS Amazon Web Services Benchmarks](https://www.cisecurity.org/benchmark/amazon_web_services)
