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

What this check verifies

Lightsail instances that have a public IP and at least one firewall rule allowing public ports are treated as publicly exposed. The evaluation inspects instance addressing and port rules to detect any port or range marked public.

Risk

Public IP plus open ports enables Internet scanning, brute force, and exploits.
  • Confidentiality: data exfiltration
  • Integrity: RCE/admin takeover via exposed services
  • Availability: DoS or abuse (botnets, cryptomining), service disruption

Recommendation

Apply least privilege network access: close unused ports, restrict sources (avoid 0.0.0.0/0), and review IPv4/IPv6 rules. Use a VPN or bastion host for administration. Place services behind private networking or load balancers, and harden/monitor any required public endpoints.

Remediation

aws lightsail put-instance-public-ports —instance-name <example_resource_name> —port-infos ’[]’

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_instance_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