AWS Fundamentals Logo
AWS Fundamentals
AWS::EC2::NetworkInterfaceAttachment

EC2 NetworkInterfaceAttachment

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.

Properties

6 configurable properties. 3 required. Click a row to see details.

Filter:
PropertyTypeFlags
DeviceIndex
string
RequiredCreate-only
InstanceId
string
RequiredCreate-only
NetworkInterfaceId
string
RequiredCreate-only
DeleteOnTermination
boolean
EnaQueueCount
integer
EnaSrdSpecification
EnaSrdSpecification

Return Values

Values returned after the resource is created. Access these with Fn::GetAtt.

AttributeTypeDescription
AttachmentIdstring-

Sample CloudFormation Template

A minimal template with required properties and common optional ones.

template.yaml
AWSTemplateFormatVersion: "2010-09-09"
Description: Sample template for AWS::EC2::NetworkInterfaceAttachment

Resources:
  MyResource:
    Type: AWS::EC2::NetworkInterfaceAttachment
    Properties:
      DeviceIndex: "value"
      InstanceId: "my-instanceid"
      NetworkInterfaceId: "my-networkinterfaceid"

Required IAM Permissions

Permissions CloudFormation needs in your IAM role to manage this resource.

create

ec2:AttachNetworkInterfaceec2:DescribeNetworkInterfacesec2:ModifyNetworkInterfaceAttribute

read

ec2:DescribeNetworkInterfaces

list

ec2:DescribeNetworkInterfaces

update

ec2:ModifyNetworkInterfaceAttributeec2:DescribeNetworkInterfacesec2:AttachNetworkInterfaceec2:DetachNetworkInterface

delete

ec2:DetachNetworkInterfaceec2:DescribeNetworkInterfaces

Get the EC2 Cheat Sheet

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

Download Free Infographic

Quick Facts

ServiceEC2
Properties7
Required3
TaggingNot supported
Primary IDAttachmentId

Supported Operations

CreateReadListUpdateDelete

Immutable After Creation

These properties cannot be changed after the resource is created. Updating them triggers a replacement.

DeviceIndexInstanceIdNetworkInterfaceId

External Links