AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::EC2::NetworkInterfaceAttachment

CfnNetworkInterfaceAttachment

Attaches an elastic network interface (ENI) to an Amazon EC2 instance. You can use this resource type to attach additional network interfaces to an instance without interruption.

Import

import { CfnNetworkInterfaceAttachment } from 'aws-cdk-lib/aws-ec2';

Or use the module namespace:

import * as ec2 from 'aws-cdk-lib/aws-ec2';
// ec2.CfnNetworkInterfaceAttachment

Properties

Configuration passed to the constructor as CfnNetworkInterfaceAttachmentProps.

deviceIndexRequired
string

The network interface's position in the attachment order. For example, the first attached network interface has a `DeviceIndex` of 0.

instanceIdRequired
string

The ID of the instance to which you will attach the ENI.

networkInterfaceIdRequired
string

The ID of the ENI that you want to attach.

deleteOnTerminationOptional
boolean | IResolvable

Whether to delete the network interface when the instance terminates. By default, this value is set to `true` .

Default: - true

enaQueueCountOptional
number

The number of ENA queues created with the instance.

enaSrdSpecificationOptional
IResolvable | EnaSrdSpecificationProperty

Configures ENA Express for the network interface that this action attaches to the instance.

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Get the Amazon EC2 Cheat Sheet

Everything you need to know about Amazon EC2 on one page. HD quality, print-friendly.

Download Free Infographic