aws-ec2-network-interfaces-batch
Enriches each input row with network interface (ENI) attributes, keyed by the row's 'interface_id' field. Only a single connect profile is supported. The following fields are read from each input row:
- interface_id (STRING, required): the target ENI identifier (e.g. eni-0abc123)
- region (STRING, optional): the region of the target ENI. If omitted, the 'region' option is used; if that is also omitted and the profile has a single configured region, that region is applied. Per-row results are written to the '_result' and '_error' fields.
Syntax
Options
- profile=STRING
- Required option. The identifier of AWS connect profile (single)
- region=STRING
- Optional option. default AWS region. Each row's 'region' field takes precedence; may be omitted for a profile with a single configured region Accepts a comma separated list. When omitted, every client region of the connect profile is queried.
Output fields
| Field | Type | Name | Description |
|---|---|---|---|
| _result | string | Result | success or fail |
| _error | string | Error | Error message on failure |
| network_interface_id | string | Network interface identifier | |
| owner_id | string | Owner ID | AWS account ID that owns the ENI |
| requester_id | string | Requester ID | id of the AWS service that created the ENI (if any) |
| requester_managed | bool | Requester managed | true = ENI created and managed by an AWS service |
| private_dns_name | string | Private DNS name | |
| public_dns_name | string | Public DNS name | public DNS name from association (if any) |
| association | map | Association | public IP/DNS mapping: {public_ip, public_dns_name, ip_owner_id, association_id, allocation_id, ...} |
| private_ip_addresses | list | Private IP addresses | list of {private_ip_address, primary, private_dns_name, public_ip} |
Error codes
Parse errors
| Error message | Cause | Resolution |
|---|---|---|
| aws-profile-not-found | No AWS connect profile matches the name given in the profile option. | Check the name on Settings > Connect Profiles and specify it again. |
| no-permission | The account running the query is not granted the connect profile. | Ask an administrator to grant the connect profile. |
| invalid-aws-region | The region option value is not an AWS region name. | Enter an exact AWS region name such as ap-northeast-2. |
| use-one-aws-profile | More than one connect profile was given in the profile option. | Specify a single connect profile. |
Description
Enriches each input row with network interface (ENI) attributes, keyed by the row's 'interface_id' field. Only a single connect profile is supported. The following fields are read from each input row:
- interface_id (STRING, required): the target ENI identifier (e.g. eni-0abc123)
- region (STRING, optional): the region of the target ENI. If omitted, the 'region' option is used; if that is also omitted and the profile has a single configured region, that region is applied. Per-row results are written to the '_result' and '_error' fields.
The following AWS IAM permissions must be allowed to use this command.
- ec2:DescribeNetworkInterfaces
Examples
Example: Lookup AWS Network Interfaces (batch)
Situation: A periodic review or an incident investigation needs the result of lookup aws network interfaces (batch).
Expected result:
| _result | _error | network_interface_id | owner_id |
|---|---|---|---|
| example | example | example-id-0123 | example-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.
Interpretation: Narrowing the scope cuts both the number of AWS API calls and the response time. Scope every scheduled query this way.