Check ID:
Provider: AWS
Service:
Severity: HIGH
Categories:
Resource type:
lightsail_instance_publicProvider: AWS
Service:
lightsailSeverity: HIGH
Categories:
internet-exposedResource type:
OtherWhat 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 markedpublic.
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 (avoid0.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
- CLI
- Terraform
- Native IaC
- Dashboard steps
aws lightsail put-instance-public-ports —instance-name <example_resource_name> —port-infos ’[]’
References
- https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-editing-firewall-rules.html
- https://docs.aws.amazon.com/lightsail/latest/userguide/understanding-public-ip-and-private-ip-addresses-in-amazon-lightsail.html#ipv4-addresses
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_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