Check ID: ec2_launch_template_no_public_ip
Provider: AWS
Service: ec2
Severity: HIGH
Categories: internet-exposed
Resource type: AwsEc2LaunchTemplate

What this check verifies

EC2 launch templates with versions that either enable associate_public_ip_address for network interfaces or reference ENIs already associated with public IPs

Risk

Assigning public IPs makes instances Internet-reachable, enabling:
  • Loss of confidentiality via unauthorized access and data exfiltration
  • Compromised integrity through remote exploitation and tampering
  • Reduced availability from DDoS and brute-force traffic Attackers can scan exposed services and pivot within the VPC.

Recommendation

Apply least privilege and network segmentation:
  • Set associate_public_ip_address=false in launch templates
  • Avoid referencing ENIs with public IPs
  • Place instances in private subnets behind NAT/ALB
  • Use Session Manager, bastions, or VPC endpoints/PrivateLink for access Adopt defense in depth to minimize exposure.

Remediation

aws ec2 create-launch-template-version --launch-template-id <example_resource_id> --launch-template-data '{"NetworkInterfaces":[{"DeviceIndex":0,"AssociatePublicIpAddress":false}]}' --set-default-version

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 = ec2_launch_template_no_public_ip. 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