EC2 launch templates should not configure network interfaces with public IPs

Description

This rule evaluates whether Amazon EC2 launch templates are configured to avoid assigning public IP addresses to network interfaces at launch.

Public IP addresses allow resources to be directly accessible from the internet, which can lead to unintended access. Restricting public IP assignment helps protect resources by minimizing exposure to external threats and ensuring controlled access.

Remediation

To update an EC2 launch template and disable public IP assignment, refer to the section Changing the Default Network Interface Settings in the Amazon EC2 Auto Scaling User Guide.