๐ก๏ธ AWS RDS Instance is publicly accessible๐ข
- Contextual name: ๐ก๏ธ Instance is publicly accessible๐ข
- ID:
/ce/ca/aws/rds/instance-publicly-accessible - Tags:
- ๐ข Policy with categories
- ๐ข Policy with type
- ๐ข Production policy
- Policy Type:
COMPLIANCE_POLICY - Policy Categories:
SECURITY
Logicโ
- ๐ง prod.logic.yaml๐ข
Similar Policiesโ
- AWS Security Hub: [RDS.2] RDS DB Instances should prohibit public access, as determined by the PubliclyAccessible configuration
- AWS Security Hub: [RDS.46] RDS DB instances should not be deployed in public subnets with routes to internet gateways
- Cloud Conformity: RDS Publicly Accessible
- Cloud Conformity: RDS Instance Not In Public Subnet
- Internal:
dec-x-f937c35f
Similar Internal Rulesโ
| Rule | Policies | Flags |
|---|---|---|
| โ๏ธ dec-x-f937c35f | 1 |
Descriptionโ
Descriptionโ
Ensure and verify that RDS database instances provisioned in your AWS account do restrict unauthorized access in order to minimize security risks. To restrict access to any publicly accessible RDS database instance, you must disable the database Publicly Accessible flag and update the VPC security group associated with the instance.
Rationaleโ
Ensure that no public-facing RDS database instances are provisioned in your AWS account and restrict unauthorized access in order to minimize security risks. When the RDS instance allows unrestricted access (0.0.0.0/0), everyone and everything on the Internet can establish a connection to your database and this can increase the opportunity for malicious activities such as brute force attacks, PostgreSQL injections, or DoS/DDoS attacks.
Auditโ
From Consoleโ
- Log in to the AWS management console and navigate to the RDS dashboard at https://console.aws.amazon.com/rds/.
- Under the navigation panel, On RDS Dashboard, click
Databases.- Select the RDS instance that you want to examine.
... see more
Remediationโ
Remediationโ
Using AWS CloudFormationโ
- CloudFormation template (YAML):
AWSTemplateFormatVersion: '2010-09-09'
Description: Disable public accessibility on an existing RDS instance
Parameters:
DBInstanceIdentifier:
Type: String
Description: Identifier of the existing RDS DB instance
Resources:
SecureRdsInstance:
Type: AWS::RDS::DBInstance
Properties:
DBInstanceIdentifier: !Ref DBInstanceIdentifier
PubliclyAccessible: falseFrom Command Lineโ
- Run
describe-db-instancescommand to list all RDS database names identifiers, available in the selected AWS region:aws rds describe-db-instances --region <region-name> --query 'DBInstances[*].DBInstanceIdentifier'
- The command output should return each database instance identifier.
- Run
modify-db-instancecommand to modify the selected RDS instance configuration. Then use the following command to disable thePublicly Accessibleflag for the selected RDS instances. This command use the apply-immediately flag. If you want to avoid any downtime--no-apply-immediatelyflag can be used:... see more