Control: 17 EC2 instances should not use multiple ENIs
Description
This control checks whether an EC2 instance uses multiple Elastic Network Interfaces (ENIs) or Elastic Fabric Adapters (EFAs). This control passes if a single network adapter is used. The control includes an optional parameter list to identify the allowed ENIs.
Multiple ENIs can cause dual-homed instances, meaning instances that have multiple subnets. This can add network security complexity and introduce unintended network paths and access.
Remediation
To remediate this issue, detach the additional ENIs.
To detach a network interface
- Open the Amazon EC2 console.
- Under
Network & Security
, chooseNetwork Interfaces
. - Filter the list by the noncompliant instance IDs to see the associated ENIs.
- Select the ENIs that you want to remove.
- From the
Actions
menu, chooseDetach
. - If you see the prompt
Are you sure that you want to detach the following network interface?
, chooseDetach
.
Usage
Run the control in your terminal:
powerpipe control run aws_compliance.control.foundational_security_ec2_17
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run aws_compliance.control.foundational_security_ec2_17 --share
SQL
This control uses a named query:
ec2_instance_not_use_multiple_enis