AWS

Download 604
Last updated Dec 1, 2026

aws-ec2-network-interfaces

Retrieves elastic network interfaces (ENIs) with their attachment and security groups.

Syntax

aws-ec2-network-interfaces [profile=STRING] [region=STRING] [interface-id=STRING] [interface-type=STRING]

Options

profile=STRING
Optional option. The identifier of AWS connect profile When omitted, every AWS connect profile the user may use is queried.
region=STRING
Optional option. AWS region Accepts a comma separated list. When omitted, every client region of the connect profile is queried.
interface-id=STRING
Optional option. comma-separated ENI ids to filter (e.g. eni-abc,eni-def)
interface-type=STRING
Optional option. comma-separated interface types to filter (e.g. interface, nat_gateway, vpc_endpoint, *load_balancer, ...)

Output fields

FieldTypeNameDescription
aws_profilestringConnect profileAWS connect profile identifier
regionstringRegione.g. ap-northeast-2
network_interface_idstringNetwork interface identifier
subnet_idstringSubnet ID
vpc_idstringVPC ID
statusstringStatuse.g. in-use, available
interface_typestringInterface typee.g. interface, nat_gateway
private_ipipPrivate IPprimary private IPv4 address
attachment_idstringAttachment ID
descriptionstringDescription
groupslistSecurity groupslist of {group_id, group_name}
owner_idstringOwner IDAWS account ID that owns the ENI
requester_idstringRequester IDid of the AWS service that created the ENI (if any)
requester_managedboolRequester managedtrue = ENI created and managed by an AWS service
private_dns_namestringPrivate DNS name
public_dns_namestringPublic DNS namepublic DNS name from association (if any)
associationmapAssociationpublic IP/DNS mapping: {public_ip, public_dns_name, ip_owner_id, association_id, allocation_id, ...}
private_ip_addresseslistPrivate IP addresseslist of {private_ip_address, primary, private_dns_name, public_ip}

Error codes

Parse errors

Error messageCauseResolution
aws-profile-not-foundNo AWS connect profile matches the name given in the profile option.Check the name on Settings > Connect Profiles and specify it again.
no-permissionThe account running the query is not granted the connect profile.Ask an administrator to grant the connect profile.
invalid-aws-regionThe region option value is not an AWS region name.Enter an exact AWS region name such as ap-northeast-2.
use-one-aws-profileMore than one connect profile was given in the profile option.Specify a single connect profile.

Description

Retrieves elastic network interfaces (ENIs) with their attachment and security groups.

The following AWS IAM permissions must be allowed to use this command.

  • ec2:DescribeNetworkInterfaces

Without the profile and region options the command queries every client region of every connect profile the user may use, so narrowing the scope with profile and region is recommended in large environments. Each record carries the aws_profile and region fields that tell which profile and region it came from.

Note
This command is available from AWS app 2.0.2612.0.

Examples

Example: List AWS Network Interfaces

Situation: A periodic review or an incident investigation needs the result of list aws network interfaces.

aws-ec2-network-interfaces

Expected result:

aws_profileregionnetwork_interface_idsubnet_id
aws-prodap-northeast-2example-id-0123example-id-0123

Interpretation: One record is one queried item. Use aws_profile and region to tell which account and region it came from, then narrow the columns with fields and either export the result or use it as the lookup stage of a detection rule.

Example: Narrowing to one account and region

Situation: Limit the scope when several connect profiles and regions exist.

aws-ec2-network-interfaces profile=aws-prod region=ap-northeast-2
| limit 100

Interpretation: Narrowing the scope cuts both the number of AWS API calls and the response time. Scope every scheduled query this way.