AWS Fundamentals Logo
AWS Fundamentals
AWS::EC2::NetworkInterface

EC2 NetworkInterface

The AWS::EC2::NetworkInterface resource creates network interface

Properties

18 configurable properties. 1 required. Click a row to see details.

Filter:
PropertyTypeFlags
SubnetId
string
RequiredCreate-only
ConnectionTrackingSpecification
ConnectionTrackingSpecification
Description
string
EnablePrimaryIpv6
boolean
GroupSet
Array<string>
InterfaceType
string
Create-only
Ipv4PrefixCount
integer
Ipv4Prefixes
Array<Ipv4PrefixSpecification>
Ipv6AddressCount
integer
Ipv6Addresses
Array<InstanceIpv6Address>
Ipv6PrefixCount
integer
Ipv6Prefixes
Array<Ipv6PrefixSpecification>
PrivateIpAddress
string
Create-only
PrivateIpAddresses
Array<PrivateIpAddressSpecification>
PublicIpDnsHostnameTypeSpecification
string
Write-only
SecondaryPrivateIpAddressCount
integer
SourceDestCheck
boolean
Tags
Array<Tag>

Return Values

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

AttributeTypeDescription
IdstringNetwork interface id.
PrimaryIpv6AddressstringThe primary IPv6 address
PrimaryPrivateIpAddressstringReturns the primary private IP address of the network interface.
PublicIpDnsNameOptionsPublicIpDnsNameOptions-
SecondaryPrivateIpAddressesArray<string>Returns the secondary private IP addresses of the network interface.
VpcIdstringThe ID of the VPC

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::NetworkInterface

Resources:
  MyResource:
    Type: AWS::EC2::NetworkInterface
    Properties:
      SubnetId: "my-subnetid"
      Tags:
        - Key: Environment
          Value: Production
      Description: !Ref "AWS::StackName"

Required IAM Permissions

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

create

ec2:CreateNetworkInterfaceec2:DescribeNetworkInterfacesec2:CreateTagsec2:ModifyNetworkInterfaceAttributeec2:ModifyPublicIpDnsNameOptions

delete

ec2:DescribeNetworkInterfacesec2:DeleteNetworkInterface

list

ec2:DescribeNetworkInterfaces

read

ec2:DescribeNetworkInterfaces

update

ec2:DescribeNetworkInterfacesec2:ModifyNetworkInterfaceAttributeec2:UnassignIpv6Addressesec2:AssignIpv6Addressesec2:DeleteTagsec2:CreateTagsec2:UnassignPrivateIpAddressesec2:AssignPrivateIpAddresses

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
Properties24
Required1
TaggingSupported
Primary IDId

Supported Operations

CreateDeleteListReadUpdate

Immutable After Creation

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

PrivateIpAddressInterfaceTypeSubnetId

External Links