Check ID:
Provider: AWS
Service:
Severity: HIGH
Categories:
Resource type:
lightsail_database_publicProvider: AWS
Service:
lightsailSeverity: HIGH
Categories:
internet-exposedResource type:
OtherWhat this check verifies
Lightsail managed database is evaluated for public accessibility. Whenpublic mode is enabled, the database accepts connections from the Internet using its endpoint and port; otherwise, access is limited to authorized Lightsail resources.
Risk
Publicly reachable databases expose confidential data and credentials to the Internet, enabling:- Brute-force and credential stuffing
- Data exfiltration via unauthorized queries
- Service disruption from scanning or DoS
Recommendation
Disable public mode and keep the database reachable only from trusted, private networks.- Enforce least privilege and network segmentation
- Use bastion hosts, tunnels, or private endpoints for admin access
- If exposure is unavoidable, restrict by IP, rotate credentials, and monitor connections for defense in depth
Remediation
- CLI
- Terraform
- Native IaC
- Dashboard steps
aws lightsail update-relational-database —relational-database-name <example_resource_name> —no-publicly-accessible
References
- https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-databases.html
- https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-configuring-database-public-mode.html
- https://spinupwp.com/doc/external-database-amazon-lightsail/
Where this check fires
This check runs on every scheduled scan against your AWS account. Findings appear at Cloud Security → Findings filterable byCheck ID = lightsail_database_public. To re-evaluate after a fix, hit Run now on the account’s schedule under Cloud Security → Schedules — the next scan re-checks this control and marks the finding fixed or keeps it persistent.
← Back to AWS checks