Skip to main content

Use Case for AWS EC2 Unattached EIP

  1. Configure AWS EC2 Unattached EIP
  2. Use Case for AWS EC2 Unattached EIP
  3. Triage Guides by Violation Type
    1. Triage AWS EC2 Unattached EIP UNATTACHED_EIP

AWS EC2 Unattached EIP

Purpose

This policy identifies unattached Elastic IP (EIP) addresses in your AWS account. Unattached EIPs incur charges, leading to unnecessary costs. Removing these unassociated EIPs helps in cost optimization.

How it Works

The policy function checks if an EIP is attached to any AWS resource (usually an EC2 instance). If it isn't, it marks the EIP as unattached.

Pros

  • Cost Saving: Reduces unnecessary costs by identifying and helping remove unattached EIPs.
  • Simplified Management: Helps in cleaning up unused resources and maintaining a streamlined environment.

Cons

  • Potential False Positives: There might be cases where EIPs are intentionally left unattached for short periods during maintenance or migrations.
  • Manual Intervention Required: The policy only detects unattached EIPs; it does not automatically release them.

Configuration Variables

This policy doesn’t require any special configuration variables.

Violation Types

  • UNATTACHED_EIP: Represents an unattached Elastic IP. This indicates chargeable but unused resources.

The policy does not have any configurable variables and always checks for unattached status. On discovering an unattached EIP, it flags it with the UNATTACHED_EIP violation type.