

This is the new *CloudFormation Template Reference Guide*. Please update your bookmarks and links. For help getting started with CloudFormation, see the [AWS CloudFormation User Guide](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/Welcome.html).

# AWS::EC2::NetworkInterface
<a name="aws-resource-ec2-networkinterface"></a>

Describes a network interface in an Amazon EC2 instance for AWS CloudFormation.

## Syntax
<a name="aws-resource-ec2-networkinterface-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-ec2-networkinterface-syntax.json"></a>

```
{
  "Type" : "AWS::EC2::NetworkInterface",
  "Properties" : {
      "[ConnectionTrackingSpecification](#cfn-ec2-networkinterface-connectiontrackingspecification)" : ConnectionTrackingSpecification,
      "[Description](#cfn-ec2-networkinterface-description)" : String,
      "[EnablePrimaryIpv6](#cfn-ec2-networkinterface-enableprimaryipv6)" : Boolean,
      "[GroupSet](#cfn-ec2-networkinterface-groupset)" : [ String, ... ],
      "[InterfaceType](#cfn-ec2-networkinterface-interfacetype)" : String,
      "[Ipv4PrefixCount](#cfn-ec2-networkinterface-ipv4prefixcount)" : Integer,
      "[Ipv4Prefixes](#cfn-ec2-networkinterface-ipv4prefixes)" : [ Ipv4PrefixSpecification, ... ],
      "[Ipv6AddressCount](#cfn-ec2-networkinterface-ipv6addresscount)" : Integer,
      "[Ipv6Addresses](#cfn-ec2-networkinterface-ipv6addresses)" : [ InstanceIpv6Address, ... ],
      "[Ipv6PrefixCount](#cfn-ec2-networkinterface-ipv6prefixcount)" : Integer,
      "[Ipv6Prefixes](#cfn-ec2-networkinterface-ipv6prefixes)" : [ Ipv6PrefixSpecification, ... ],
      "[PrivateIpAddress](#cfn-ec2-networkinterface-privateipaddress)" : String,
      "[PrivateIpAddresses](#cfn-ec2-networkinterface-privateipaddresses)" : [ PrivateIpAddressSpecification, ... ],
      "[PublicIpDnsHostnameTypeSpecification](#cfn-ec2-networkinterface-publicipdnshostnametypespecification)" : String,
      "[SecondaryPrivateIpAddressCount](#cfn-ec2-networkinterface-secondaryprivateipaddresscount)" : Integer,
      "[SourceDestCheck](#cfn-ec2-networkinterface-sourcedestcheck)" : Boolean,
      "[SubnetId](#cfn-ec2-networkinterface-subnetid)" : String,
      "[Tags](#cfn-ec2-networkinterface-tags)" : [ Tag, ... ]
    }
}
```

### YAML
<a name="aws-resource-ec2-networkinterface-syntax.yaml"></a>

```
Type: AWS::EC2::NetworkInterface
Properties:
  [ConnectionTrackingSpecification](#cfn-ec2-networkinterface-connectiontrackingspecification): 
    ConnectionTrackingSpecification
  [Description](#cfn-ec2-networkinterface-description): String
  [EnablePrimaryIpv6](#cfn-ec2-networkinterface-enableprimaryipv6): Boolean
  [GroupSet](#cfn-ec2-networkinterface-groupset): 
    - String
  [InterfaceType](#cfn-ec2-networkinterface-interfacetype): String
  [Ipv4PrefixCount](#cfn-ec2-networkinterface-ipv4prefixcount): Integer
  [Ipv4Prefixes](#cfn-ec2-networkinterface-ipv4prefixes): 
    - Ipv4PrefixSpecification
  [Ipv6AddressCount](#cfn-ec2-networkinterface-ipv6addresscount): Integer
  [Ipv6Addresses](#cfn-ec2-networkinterface-ipv6addresses): 
    - InstanceIpv6Address
  [Ipv6PrefixCount](#cfn-ec2-networkinterface-ipv6prefixcount): Integer
  [Ipv6Prefixes](#cfn-ec2-networkinterface-ipv6prefixes): 
    - Ipv6PrefixSpecification
  [PrivateIpAddress](#cfn-ec2-networkinterface-privateipaddress): String
  [PrivateIpAddresses](#cfn-ec2-networkinterface-privateipaddresses): 
    - PrivateIpAddressSpecification
  [PublicIpDnsHostnameTypeSpecification](#cfn-ec2-networkinterface-publicipdnshostnametypespecification): String
  [SecondaryPrivateIpAddressCount](#cfn-ec2-networkinterface-secondaryprivateipaddresscount): Integer
  [SourceDestCheck](#cfn-ec2-networkinterface-sourcedestcheck): Boolean
  [SubnetId](#cfn-ec2-networkinterface-subnetid): String
  [Tags](#cfn-ec2-networkinterface-tags): 
    - Tag
```

## Properties
<a name="aws-resource-ec2-networkinterface-properties"></a>

`ConnectionTrackingSpecification`  <a name="cfn-ec2-networkinterface-connectiontrackingspecification"></a>
A connection tracking specification for the network interface.  
*Required*: No  
*Type*: [ConnectionTrackingSpecification](aws-properties-ec2-networkinterface-connectiontrackingspecification.md)  
*Update requires*: [Some interruptions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-some-interrupt)

`Description`  <a name="cfn-ec2-networkinterface-description"></a>
A description for the network interface.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`EnablePrimaryIpv6`  <a name="cfn-ec2-networkinterface-enableprimaryipv6"></a>
If you’re modifying a network interface in a dual-stack or IPv6-only subnet, you have the option to assign a primary IPv6 IP address. A primary IPv6 address is an IPv6 GUA address associated with an ENI that you have enabled to use a primary IPv6 address. Use this option if the instance that this ENI will be attached to relies on its IPv6 address not changing. AWS will automatically assign an IPv6 address associated with the ENI attached to your instance to be the primary IPv6 address. Once you enable an IPv6 GUA address to be a primary IPv6, you cannot disable it. When you enable an IPv6 GUA address to be a primary IPv6, the first IPv6 GUA will be made the primary IPv6 address until the instance is terminated or the network interface is detached. If you have multiple IPv6 addresses associated with an ENI attached to your instance and you enable a primary IPv6 address, the first IPv6 GUA address associated with the ENI becomes the primary IPv6 address.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [Some interruptions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-some-interrupt)

`GroupSet`  <a name="cfn-ec2-networkinterface-groupset"></a>
The IDs of the security groups associated with this network interface.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`InterfaceType`  <a name="cfn-ec2-networkinterface-interfacetype"></a>
The type of network interface. The default is `interface`. The supported values are `efa` and `trunk`.  
*Required*: No  
*Type*: String  
*Allowed values*: `efa | efa-only | branch | trunk`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Ipv4PrefixCount`  <a name="cfn-ec2-networkinterface-ipv4prefixcount"></a>
The number of IPv4 prefixes to be automatically assigned to the network interface.  
When creating a network interface, you can't specify a count of IPv4 prefixes if you've specified one of the following: specific IPv4 prefixes, specific private IPv4 addresses, or a count of private IPv4 addresses.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Ipv4Prefixes`  <a name="cfn-ec2-networkinterface-ipv4prefixes"></a>
The IPv4 delegated prefixes that are assigned to the network interface.  
When creating a network interface, you can't specify IPv4 prefixes if you've specified one of the following: a count of IPv4 prefixes, specific private IPv4 addresses, or a count of private IPv4 addresses.  
*Required*: No  
*Type*: Array of [Ipv4PrefixSpecification](aws-properties-ec2-networkinterface-ipv4prefixspecification.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Ipv6AddressCount`  <a name="cfn-ec2-networkinterface-ipv6addresscount"></a>
The number of IPv6 addresses to assign to the network interface. Amazon EC2 automatically selects the IPv6 addresses from the subnet range. To specify specific IPv6 addresses, use the `Ipv6Addresses` property and don't specify this property.  
When creating a network interface, you can't specify a count of IPv6 addresses if you've specified one of the following: specific IPv6 addresses, specific IPv6 prefixes, or a count of IPv6 prefixes.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Ipv6Addresses`  <a name="cfn-ec2-networkinterface-ipv6addresses"></a>
The IPv6 addresses from the IPv6 CIDR block range of your subnet to assign to the network interface. If you're specifying a number of IPv6 addresses, use the `Ipv6AddressCount` property and don't specify this property.  
When creating a network interface, you can't specify IPv6 addresses if you've specified one of the following: a count of IPv6 addresses, specific IPv6 prefixes, or a count of IPv6 prefixes.  
*Required*: No  
*Type*: Array of [InstanceIpv6Address](aws-properties-ec2-networkinterface-instanceipv6address.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Ipv6PrefixCount`  <a name="cfn-ec2-networkinterface-ipv6prefixcount"></a>
The number of IPv6 prefixes to be automatically assigned to the network interface.  
When creating a network interface, you can't specify a count of IPv6 prefixes if you've specified one of the following: specific IPv6 prefixes, specific IPv6 addresses, or a count of IPv6 addresses.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Ipv6Prefixes`  <a name="cfn-ec2-networkinterface-ipv6prefixes"></a>
The IPv6 delegated prefixes that are assigned to the network interface.  
When creating a network interface, you can't specify IPv6 prefixes if you've specified one of the following: a count of IPv6 prefixes, specific IPv6 addresses, or a count of IPv6 addresses.  
*Required*: No  
*Type*: Array of [Ipv6PrefixSpecification](aws-properties-ec2-networkinterface-ipv6prefixspecification.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`PrivateIpAddress`  <a name="cfn-ec2-networkinterface-privateipaddress"></a>
The private IPv4 address to assign to the network interface as the primary private IP address. If you want to specify multiple private IP addresses, use the `PrivateIpAddresses` property.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`PrivateIpAddresses`  <a name="cfn-ec2-networkinterface-privateipaddresses"></a>
The private IPv4 addresses to assign to the network interface. You can specify a primary private IP address by setting the value of the `Primary` property to `true` in the `PrivateIpAddressSpecification` property. If you want EC2 to automatically assign private IP addresses, use the `SecondaryPrivateIpAddressCount` property and do not specify this property.  
When creating a network interface, you can't specify private IPv4 addresses if you've specified one of the following: a count of private IPv4 addresses, specific IPv4 prefixes, or a count of IPv4 prefixes.  
*Required*: No  
*Type*: Array of [PrivateIpAddressSpecification](aws-properties-ec2-networkinterface-privateipaddressspecification.md)  
*Update requires*: [Some interruptions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-some-interrupt)

`PublicIpDnsHostnameTypeSpecification`  <a name="cfn-ec2-networkinterface-publicipdnshostnametypespecification"></a>
Property description not available.  
*Required*: No  
*Type*: String  
*Allowed values*: `public-dual-stack-dns-name | public-ipv4-dns-name | public-ipv6-dns-name`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SecondaryPrivateIpAddressCount`  <a name="cfn-ec2-networkinterface-secondaryprivateipaddresscount"></a>
The number of secondary private IPv4 addresses to assign to a network interface. When you specify a number of secondary IPv4 addresses, Amazon EC2 selects these IP addresses within the subnet's IPv4 CIDR range. You can't specify this option and specify more than one private IP address using `privateIpAddresses`.  
When creating a Network Interface, you can't specify a count of private IPv4 addresses if you've specified one of the following: specific private IPv4 addresses, specific IPv4 prefixes, or a count of IPv4 prefixes.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SourceDestCheck`  <a name="cfn-ec2-networkinterface-sourcedestcheck"></a>
Enable or disable source/destination checks, which ensure that the instance is either the source or the destination of any traffic that it receives. If the value is `true`, source/destination checks are enabled; otherwise, they are disabled. The default value is `true`. You must disable source/destination checks if the instance runs services such as network address translation, routing, or firewalls.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SubnetId`  <a name="cfn-ec2-networkinterface-subnetid"></a>
The ID of the subnet to associate with the network interface.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Tags`  <a name="cfn-ec2-networkinterface-tags"></a>
The tags to apply to the network interface.  
*Required*: No  
*Type*: Array of [Tag](aws-properties-ec2-networkinterface-tag.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-ec2-networkinterface-return-values"></a>

### Ref
<a name="aws-resource-ec2-networkinterface-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the ID of the network interface.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-ec2-networkinterface-return-values-fn--getatt"></a>

The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the `Fn::GetAtt` intrinsic function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-ec2-networkinterface-return-values-fn--getatt-fn--getatt"></a>

`Id`  <a name="Id-fn::getatt"></a>
The ID of the network interface.

`PrimaryIpv6Address`  <a name="PrimaryIpv6Address-fn::getatt"></a>
The primary IPv6 address of the network interface.

`PrimaryPrivateIpAddress`  <a name="PrimaryPrivateIpAddress-fn::getatt"></a>
The primary private IP address of the network interface. For example, `10.0.0.192`.

`SecondaryPrivateIpAddresses`  <a name="SecondaryPrivateIpAddresses-fn::getatt"></a>
The secondary private IP addresses of the network interface. For example, `["10.0.0.161", "10.0.0.162", "10.0.0.163"]`.

`VpcId`  <a name="VpcId-fn::getatt"></a>
The ID of the VPC.

## Examples
<a name="aws-resource-ec2-networkinterface--examples"></a>



**Topics**
+ [Basic network interface](#aws-resource-ec2-networkinterface--examples--Basic_network_interface)
+ [Attach a network interface to an EC2 instance at launch](#aws-resource-ec2-networkinterface--examples--Attach_a_network_interface_to_an_EC2_instance_at_launch)

### Basic network interface
<a name="aws-resource-ec2-networkinterface--examples--Basic_network_interface"></a>

This example creates a standalone elastic network interface (ENI). To learn how to attach this network interface to an instance at launch, see the next example on this page.

#### JSON
<a name="aws-resource-ec2-networkinterface--examples--Basic_network_interface--json"></a>

```
"myENI" : {
   "Type" : "AWS::EC2::NetworkInterface",
   "Properties" : {
      "Tags": [{"Key":"stack","Value":"production"}],
      "Description": "A nice description.",
      "SourceDestCheck": "false",
      "GroupSet": ["sg-75zzz219"],
      "SubnetId": "subnet-3z648z53",
      "PrivateIpAddress": "10.0.0.16"
   }
}
```

#### YAML
<a name="aws-resource-ec2-networkinterface--examples--Basic_network_interface--yaml"></a>

```
   myENI:
      Type: AWS::EC2::NetworkInterface
      Properties:
         Tags:
         - Key: stack
           Value: production
         Description: A nice description.
         SourceDestCheck: 'false'
         GroupSet:
         - sg-75zzz219
         SubnetId: subnet-3z648z53
         PrivateIpAddress: 10.0.0.16
```

### Attach a network interface to an EC2 instance at launch
<a name="aws-resource-ec2-networkinterface--examples--Attach_a_network_interface_to_an_EC2_instance_at_launch"></a>

This example attaches a network interface to an EC2 instance. You can use the NetworkInterface property to add more than one network interface. However, you can specify multiple network interfaces if they all have only private IP addresses (no associated public IP address). If you have a network interface with a public IP address, specify when you launch the instance and then use `AWS::EC2::NetworkInterfaceAttachment` to attach the additional network interfaces.

#### JSON
<a name="aws-resource-ec2-networkinterface--examples--Attach_a_network_interface_to_an_EC2_instance_at_launch--json"></a>

```
"Ec2Instance" : {
   "Type" : "AWS::EC2::Instance",
   "Properties" : {
      "ImageId" : { "Fn::FindInMap" : [ "RegionMap", { "Ref" : "AWS::Region" }, "AMI" ]},
      "KeyName" : { "Ref" : "KeyName" },
      "SecurityGroupIds" : [{ "Ref" : "WebSecurityGroup" }],
      "SubnetId" : { "Ref" : "SubnetId" },
      "NetworkInterfaces" : [ {
         "NetworkInterfaceId" : {"Ref" : "myENI"}, "DeviceIndex" : "1" } ],
      "Tags" : [ {"Key" : "Role", "Value" : "Test Instance"}],
      "UserData" : { "Fn::Base64" : { "Ref" : "WebServerPort" }}
   }
}
```

#### YAML
<a name="aws-resource-ec2-networkinterface--examples--Attach_a_network_interface_to_an_EC2_instance_at_launch--yaml"></a>

```
Ec2Instance:
   Type: AWS::EC2::Instance
   Properties:
      ImageId:
         Fn::FindInMap:
         - RegionMap
         - Ref: AWS::Region
         - AMI
      KeyName:
         Ref: KeyName
      SecurityGroupIds:
      - Ref: WebSecurityGroup
      SubnetId:
         Ref: SubnetId
      NetworkInterfaces:
      - NetworkInterfaceId:
         Ref: myENI
        DeviceIndex: '1'
      Tags:
      - Key: Role
        Value: Test Instance
      UserData:
         Fn::Base64:
            Ref: WebServerPort
```

## See also
<a name="aws-resource-ec2-networkinterface--seealso"></a>
+ [NetworkInterface](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_NetworkInterface.html) in the *Amazon EC2 API Reference*



# AWS::EC2::NetworkInterface ConnectionTrackingSpecification
<a name="aws-properties-ec2-networkinterface-connectiontrackingspecification"></a>

Configurable options for connection tracking on a network interface. For more information, see [Connection tracking timeouts](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/security-group-connection-tracking.html#connection-tracking-timeouts) in the *Amazon Elastic Compute Cloud User Guide*.

## Syntax
<a name="aws-properties-ec2-networkinterface-connectiontrackingspecification-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ec2-networkinterface-connectiontrackingspecification-syntax.json"></a>

```
{
  "[TcpEstablishedTimeout](#cfn-ec2-networkinterface-connectiontrackingspecification-tcpestablishedtimeout)" : Integer,
  "[UdpStreamTimeout](#cfn-ec2-networkinterface-connectiontrackingspecification-udpstreamtimeout)" : Integer,
  "[UdpTimeout](#cfn-ec2-networkinterface-connectiontrackingspecification-udptimeout)" : Integer
}
```

### YAML
<a name="aws-properties-ec2-networkinterface-connectiontrackingspecification-syntax.yaml"></a>

```
  [TcpEstablishedTimeout](#cfn-ec2-networkinterface-connectiontrackingspecification-tcpestablishedtimeout): Integer
  [UdpStreamTimeout](#cfn-ec2-networkinterface-connectiontrackingspecification-udpstreamtimeout): Integer
  [UdpTimeout](#cfn-ec2-networkinterface-connectiontrackingspecification-udptimeout): Integer
```

## Properties
<a name="aws-properties-ec2-networkinterface-connectiontrackingspecification-properties"></a>

`TcpEstablishedTimeout`  <a name="cfn-ec2-networkinterface-connectiontrackingspecification-tcpestablishedtimeout"></a>
Timeout (in seconds) for idle TCP connections in an established state. Min: 60 seconds. Max: 432000 seconds (5 days). Default: 432000 seconds. Recommended: Less than 432000 seconds.  
*Required*: No  
*Type*: Integer  
*Update requires*: [Some interruptions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-some-interrupt)

`UdpStreamTimeout`  <a name="cfn-ec2-networkinterface-connectiontrackingspecification-udpstreamtimeout"></a>
Timeout (in seconds) for idle UDP flows classified as streams which have seen more than one request-response transaction. Min: 60 seconds. Max: 180 seconds (3 minutes). Default: 180 seconds.  
*Required*: No  
*Type*: Integer  
*Update requires*: [Some interruptions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-some-interrupt)

`UdpTimeout`  <a name="cfn-ec2-networkinterface-connectiontrackingspecification-udptimeout"></a>
Timeout (in seconds) for idle UDP flows that have seen traffic only in a single direction or a single request-response transaction. Min: 30 seconds. Max: 60 seconds. Default: 30 seconds.  
*Required*: No  
*Type*: Integer  
*Update requires*: [Some interruptions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-some-interrupt)

# AWS::EC2::NetworkInterface InstanceIpv6Address
<a name="aws-properties-ec2-networkinterface-instanceipv6address"></a>

Describes the IPv6 addresses to associate with the network interface.

## Syntax
<a name="aws-properties-ec2-networkinterface-instanceipv6address-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ec2-networkinterface-instanceipv6address-syntax.json"></a>

```
{
  "[Ipv6Address](#cfn-ec2-networkinterface-instanceipv6address-ipv6address)" : String
}
```

### YAML
<a name="aws-properties-ec2-networkinterface-instanceipv6address-syntax.yaml"></a>

```
  [Ipv6Address](#cfn-ec2-networkinterface-instanceipv6address-ipv6address): String
```

## Properties
<a name="aws-properties-ec2-networkinterface-instanceipv6address-properties"></a>

`Ipv6Address`  <a name="cfn-ec2-networkinterface-instanceipv6address-ipv6address"></a>
An IPv6 address to associate with the network interface.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::EC2::NetworkInterface Ipv4PrefixSpecification
<a name="aws-properties-ec2-networkinterface-ipv4prefixspecification"></a>

Describes an IPv4 prefix.

## Syntax
<a name="aws-properties-ec2-networkinterface-ipv4prefixspecification-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ec2-networkinterface-ipv4prefixspecification-syntax.json"></a>

```
{
  "[Ipv4Prefix](#cfn-ec2-networkinterface-ipv4prefixspecification-ipv4prefix)" : String
}
```

### YAML
<a name="aws-properties-ec2-networkinterface-ipv4prefixspecification-syntax.yaml"></a>

```
  [Ipv4Prefix](#cfn-ec2-networkinterface-ipv4prefixspecification-ipv4prefix): String
```

## Properties
<a name="aws-properties-ec2-networkinterface-ipv4prefixspecification-properties"></a>

`Ipv4Prefix`  <a name="cfn-ec2-networkinterface-ipv4prefixspecification-ipv4prefix"></a>
The IPv4 prefix. For information, see [ Assigning prefixes to network interfaces](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-prefix-eni.html) in the *Amazon EC2 User Guide*.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::EC2::NetworkInterface Ipv6PrefixSpecification
<a name="aws-properties-ec2-networkinterface-ipv6prefixspecification"></a>

Describes the IPv6 prefix.

## Syntax
<a name="aws-properties-ec2-networkinterface-ipv6prefixspecification-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ec2-networkinterface-ipv6prefixspecification-syntax.json"></a>

```
{
  "[Ipv6Prefix](#cfn-ec2-networkinterface-ipv6prefixspecification-ipv6prefix)" : String
}
```

### YAML
<a name="aws-properties-ec2-networkinterface-ipv6prefixspecification-syntax.yaml"></a>

```
  [Ipv6Prefix](#cfn-ec2-networkinterface-ipv6prefixspecification-ipv6prefix): String
```

## Properties
<a name="aws-properties-ec2-networkinterface-ipv6prefixspecification-properties"></a>

`Ipv6Prefix`  <a name="cfn-ec2-networkinterface-ipv6prefixspecification-ipv6prefix"></a>
The IPv6 prefix. For information, see [ Assigning prefixes to Amazon EC2 network interfaces](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-prefix-eni.html) in the *Amazon Elastic Compute Cloud User Guide*.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::EC2::NetworkInterface PrivateIpAddressSpecification
<a name="aws-properties-ec2-networkinterface-privateipaddressspecification"></a>

Describes a secondary private IPv4 address for a network interface.

## Syntax
<a name="aws-properties-ec2-networkinterface-privateipaddressspecification-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ec2-networkinterface-privateipaddressspecification-syntax.json"></a>

```
{
  "[Primary](#cfn-ec2-networkinterface-privateipaddressspecification-primary)" : Boolean,
  "[PrivateIpAddress](#cfn-ec2-networkinterface-privateipaddressspecification-privateipaddress)" : String
}
```

### YAML
<a name="aws-properties-ec2-networkinterface-privateipaddressspecification-syntax.yaml"></a>

```
  [Primary](#cfn-ec2-networkinterface-privateipaddressspecification-primary): Boolean
  [PrivateIpAddress](#cfn-ec2-networkinterface-privateipaddressspecification-privateipaddress): String
```

## Properties
<a name="aws-properties-ec2-networkinterface-privateipaddressspecification-properties"></a>

`Primary`  <a name="cfn-ec2-networkinterface-privateipaddressspecification-primary"></a>
Sets the private IP address as the primary private address. You can set only one primary private IP address. If you don't specify a primary private IP address, Amazon EC2 automatically assigns a primary private IP address.  
*Required*: Yes  
*Type*: Boolean  
*Update requires*: [Some interruptions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-some-interrupt)

`PrivateIpAddress`  <a name="cfn-ec2-networkinterface-privateipaddressspecification-privateipaddress"></a>
The private IP address of the network interface.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Some interruptions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-some-interrupt)

# AWS::EC2::NetworkInterface PublicIpDnsNameOptions
<a name="aws-properties-ec2-networkinterface-publicipdnsnameoptions"></a>

Public hostname type options. For more information, see [EC2 instance hostnames, DNS names, and domains](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-naming.html) in the *Amazon EC2 User Guide*.

## Syntax
<a name="aws-properties-ec2-networkinterface-publicipdnsnameoptions-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ec2-networkinterface-publicipdnsnameoptions-syntax.json"></a>

```
{
  "[DnsHostnameType](#cfn-ec2-networkinterface-publicipdnsnameoptions-dnshostnametype)" : String,
  "[PublicDualStackDnsName](#cfn-ec2-networkinterface-publicipdnsnameoptions-publicdualstackdnsname)" : String,
  "[PublicIpv4DnsName](#cfn-ec2-networkinterface-publicipdnsnameoptions-publicipv4dnsname)" : String,
  "[PublicIpv6DnsName](#cfn-ec2-networkinterface-publicipdnsnameoptions-publicipv6dnsname)" : String
}
```

### YAML
<a name="aws-properties-ec2-networkinterface-publicipdnsnameoptions-syntax.yaml"></a>

```
  [DnsHostnameType](#cfn-ec2-networkinterface-publicipdnsnameoptions-dnshostnametype): String
  [PublicDualStackDnsName](#cfn-ec2-networkinterface-publicipdnsnameoptions-publicdualstackdnsname): String
  [PublicIpv4DnsName](#cfn-ec2-networkinterface-publicipdnsnameoptions-publicipv4dnsname): String
  [PublicIpv6DnsName](#cfn-ec2-networkinterface-publicipdnsnameoptions-publicipv6dnsname): String
```

## Properties
<a name="aws-properties-ec2-networkinterface-publicipdnsnameoptions-properties"></a>

`DnsHostnameType`  <a name="cfn-ec2-networkinterface-publicipdnsnameoptions-dnshostnametype"></a>
The public hostname type. For more information, see [EC2 instance hostnames, DNS names, and domains](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-naming.html) in the *Amazon EC2 User Guide*.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`PublicDualStackDnsName`  <a name="cfn-ec2-networkinterface-publicipdnsnameoptions-publicdualstackdnsname"></a>
A dual-stack public hostname for a network interface. Requests from within the VPC resolve to both the private IPv4 address and the IPv6 Global Unicast Address of the network interface. Requests from the internet resolve to both the public IPv4 and the IPv6 GUA address of the network interface.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`PublicIpv4DnsName`  <a name="cfn-ec2-networkinterface-publicipdnsnameoptions-publicipv4dnsname"></a>
An IPv4-enabled public hostname for a network interface. Requests from within the VPC resolve to the private primary IPv4 address of the network interface. Requests from the internet resolve to the public IPv4 address of the network interface.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`PublicIpv6DnsName`  <a name="cfn-ec2-networkinterface-publicipdnsnameoptions-publicipv6dnsname"></a>
An IPv6-enabled public hostname for a network interface. Requests from within the VPC or from the internet resolve to the IPv6 GUA of the network interface.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::EC2::NetworkInterface Tag
<a name="aws-properties-ec2-networkinterface-tag"></a>

Specifies a tag. For more information, see [Resource tags](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html).

## Syntax
<a name="aws-properties-ec2-networkinterface-tag-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ec2-networkinterface-tag-syntax.json"></a>

```
{
  "[Key](#cfn-ec2-networkinterface-tag-key)" : String,
  "[Value](#cfn-ec2-networkinterface-tag-value)" : String
}
```

### YAML
<a name="aws-properties-ec2-networkinterface-tag-syntax.yaml"></a>

```
  [Key](#cfn-ec2-networkinterface-tag-key): String
  [Value](#cfn-ec2-networkinterface-tag-value): String
```

## Properties
<a name="aws-properties-ec2-networkinterface-tag-properties"></a>

`Key`  <a name="cfn-ec2-networkinterface-tag-key"></a>
The tag key.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-ec2-networkinterface-tag-value"></a>
The tag value.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Examples
<a name="aws-properties-ec2-networkinterface-tag--examples"></a>

### 
<a name="aws-properties-ec2-networkinterface-tag--examples--"></a>

This example specifies two tags for the network interface.

#### JSON
<a name="aws-properties-ec2-networkinterface-tag--examples----json"></a>

```
"Tags" : [
   {
      "Key" : "key1",
      "Value" : "value1"
   },
   {
      "Key" : "key2",
      "Value" : "value2"
   }
]
```

#### YAML
<a name="aws-properties-ec2-networkinterface-tag--examples----yaml"></a>

```
Tags: 
  - Key: "key1"
    Value: "value1"
  - Key: "key2"
    Value: "value2"
```