More Info:

RDS instances should not be launched into the public cloud. Unless there is a specific business requirement, RDS instances should not have a public endpoint and should be accessed from within a VPC only.

Risk Level

High

Address

Security

Compliance Standards

NIST

Triage and Remediation

Remediation

To remediate the misconfiguration of RDS instances being publicly accessible in AWS, you can follow these steps using the AWS Management Console:

  1. Log in to the AWS Management Console: Go to https://aws.amazon.com/ and log in to your AWS account.

  2. Navigate to the RDS Dashboard: Click on the “Services” dropdown menu at the top of the page, select “RDS” under the Database section.

  3. Select the RDS Instance: From the list of RDS instances, select the instance that you want to modify the security group for by clicking on its identifier.

  4. Modify the Security Group: In the RDS instance details page, scroll down to the “Security group rules” section. Click on the security group name listed there.

  5. Edit Inbound Rules: In the security group’s “Inbound rules” tab, you will see the current rules allowing inbound traffic to the RDS instance. To make the RDS instance not publicly accessible, you need to remove the rule that allows inbound traffic from any source (0.0.0.0/0).

  6. Delete the Public Access Rule: Find the rule that allows inbound traffic from 0.0.0.0/0 (or any IP address range), select it, and click on the “Delete” or “Remove” button to remove this rule.

  7. Add Specific IP Addresses (Optional): If you still need to access the RDS instance from specific IP addresses or ranges, you can add new inbound rules to allow traffic only from those specific sources.

  8. Save Changes: After removing the public access rule and adding specific IP addresses if necessary, click on the “Save rules” or “Apply changes” button to apply the new security group rules.

By following these steps, you have successfully remediated the misconfiguration of making RDS instances publicly accessible in AWS by updating the security group rules to restrict access to specific IP addresses or ranges.

Additional Reading: