Check ID: lightsail_database_public
Provider: AWS
Service: lightsail
Severity: HIGH
Categories: internet-exposed
Resource type: Other

What this check verifies

Lightsail managed database is evaluated for public accessibility. When public 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
Compromise enables lateral movement and tampering, impacting confidentiality, integrity, and availability.

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

aws lightsail update-relational-database —relational-database-name <example_resource_name> —no-publicly-accessible

References

Where this check fires

This check runs on every scheduled scan against your AWS account. Findings appear at Cloud Security → Findings filterable by Check 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