This is the new Amazon CloudFormation Template Reference Guide. Please update your bookmarks and links. For help getting started with CloudFormation, see the Amazon CloudFormation User Guide.
AWS::EC2::LaunchTemplate NetworkInterface
Specifies the parameters for a network interface.
NetworkInterface is a property of AWS::EC2::LaunchTemplate LaunchTemplateData.
Syntax
To declare this entity in your Amazon CloudFormation template, use the following syntax:
JSON
{ "AssociateCarrierIpAddress" :Boolean, "AssociatePublicIpAddress" :Boolean, "ConnectionTrackingSpecification" :ConnectionTrackingSpecification, "DeleteOnTermination" :Boolean, "Description" :String, "DeviceIndex" :Integer, "EnaQueueCount" :Integer, "EnaSrdSpecification" :EnaSrdSpecification, "Groups" :[ String, ... ], "InterfaceType" :String, "Ipv4PrefixCount" :Integer, "Ipv4Prefixes" :[ Ipv4PrefixSpecification, ... ], "Ipv6AddressCount" :Integer, "Ipv6Addresses" :[ Ipv6Add, ... ], "Ipv6PrefixCount" :Integer, "Ipv6Prefixes" :[ Ipv6PrefixSpecification, ... ], "NetworkCardIndex" :Integer, "NetworkInterfaceId" :String, "PrimaryIpv6" :Boolean, "PrivateIpAddress" :String, "PrivateIpAddresses" :[ PrivateIpAdd, ... ], "SecondaryPrivateIpAddressCount" :Integer, "SubnetId" :String}
YAML
AssociateCarrierIpAddress:BooleanAssociatePublicIpAddress:BooleanConnectionTrackingSpecification:ConnectionTrackingSpecificationDeleteOnTermination:BooleanDescription:StringDeviceIndex:IntegerEnaQueueCount:IntegerEnaSrdSpecification:EnaSrdSpecificationGroups:- StringInterfaceType:StringIpv4PrefixCount:IntegerIpv4Prefixes:- Ipv4PrefixSpecificationIpv6AddressCount:IntegerIpv6Addresses:- Ipv6AddIpv6PrefixCount:IntegerIpv6Prefixes:- Ipv6PrefixSpecificationNetworkCardIndex:IntegerNetworkInterfaceId:StringPrimaryIpv6:BooleanPrivateIpAddress:StringPrivateIpAddresses:- PrivateIpAddSecondaryPrivateIpAddressCount:IntegerSubnetId:String
Properties
AssociateCarrierIpAddress-
Associates a Carrier IP address with eth0 for a new network interface.
Use this option when you launch an instance in a Wavelength Zone and want to associate a Carrier IP address with the network interface. For more information about Carrier IP addresses, see Carrier IP addresses in the Amazon Wavelength Developer Guide.
Required: No
Type: Boolean
Update requires: No interruption
AssociatePublicIpAddress-
Associates a public IPv4 address with eth0 for a new network interface.
Amazon charges for all public IPv4 addresses, including public IPv4 addresses associated with running instances and Elastic IP addresses. For more information, see the Public IPv4 Address tab on the Amazon VPC pricing page
. Required: No
Type: Boolean
Update requires: No interruption
ConnectionTrackingSpecification-
A connection tracking specification for the network interface.
Required: No
Type: ConnectionTrackingSpecification
Update requires: No interruption
DeleteOnTermination-
Indicates whether the network interface is deleted when the instance is terminated.
Required: No
Type: Boolean
Update requires: No interruption
Description-
A description for the network interface.
Required: No
Type: String
Update requires: No interruption
DeviceIndex-
The device index for the network interface attachment. The primary network interface has a device index of 0. If the network interface is of type
interface, you must specify a device index.If you create a launch template that includes secondary network interfaces but no primary network interface, and you specify it using the
LaunchTemplateproperty ofAWS::EC2::Instance, then you must include a primary network interface using theNetworkInterfacesproperty ofAWS::EC2::Instance.Required: Conditional
Type: Integer
Update requires: No interruption
EnaQueueCount-
The number of ENA queues to be created with the instance.
Required: No
Type: Integer
Update requires: No interruption
EnaSrdSpecification-
The ENA Express configuration for the network interface.
Required: No
Type: EnaSrdSpecification
Update requires: No interruption
Groups-
The IDs of one or more security groups.
Required: No
Type: Array of String
Update requires: No interruption
InterfaceType-
The type of network interface. To create an Elastic Fabric Adapter (EFA), specify
efaorefa. For more information, see Elastic Fabric Adapter for AI/ML and HPC workloads on Amazon EC2 in the Amazon EC2 User Guide.If you are not creating an EFA, specify
interfaceor omit this parameter.If you specify
efa-only, do not assign any IP addresses to the network interface. EFA-only network interfaces do not support IP addresses.Valid values:
interface|efa|efa-onlyRequired: No
Type: String
Update requires: No interruption
Ipv4PrefixCount-
The number of IPv4 prefixes to be automatically assigned to the network interface. You cannot use this option if you use the
Ipv4Prefixoption.Required: No
Type: Integer
Update requires: No interruption
Ipv4Prefixes-
One or more IPv4 prefixes to be assigned to the network interface. You cannot use this option if you use the
Ipv4PrefixCountoption.Required: No
Type: Array of Ipv4PrefixSpecification
Update requires: No interruption
Ipv6AddressCount-
The number of IPv6 addresses to assign to a network interface. Amazon EC2 automatically selects the IPv6 addresses from the subnet range. You can't use this option if specifying specific IPv6 addresses.
Required: No
Type: Integer
Update requires: No interruption
Ipv6Addresses-
One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. You can't use this option if you're specifying a number of IPv6 addresses.
Required: No
Type: Array of Ipv6Add
Update requires: No interruption
Ipv6PrefixCount-
The number of IPv6 prefixes to be automatically assigned to the network interface. You cannot use this option if you use the
Ipv6Prefixoption.Required: No
Type: Integer
Update requires: No interruption
Ipv6Prefixes-
One or more IPv6 prefixes to be assigned to the network interface. You cannot use this option if you use the
Ipv6PrefixCountoption.Required: No
Type: Array of Ipv6PrefixSpecification
Update requires: No interruption
NetworkCardIndex-
The index of the network card. Some instance types support multiple network cards. The primary network interface must be assigned to network card index 0. The default is network card index 0.
Required: No
Type: Integer
Update requires: No interruption
NetworkInterfaceId-
The ID of the network interface.
Required: No
Type: String
Update requires: No interruption
PrimaryIpv6-
The primary IPv6 address of the network interface. 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. For more information about primary IPv6 addresses, see RunInstances.
Required: No
Type: Boolean
Update requires: No interruption
PrivateIpAddress-
The primary private IPv4 address of the network interface.
Required: No
Type: String
Update requires: No interruption
PrivateIpAddresses-
One or more private IPv4 addresses.
Required: No
Type: Array of PrivateIpAdd
Update requires: No interruption
SecondaryPrivateIpAddressCount-
The number of secondary private IPv4 addresses to assign to a network interface.
Required: No
Type: Integer
Update requires: No interruption
SubnetId-
The ID of the subnet for the network interface.
Required: No
Type: String
Update requires: No interruption
See also
-
LaunchTemplateInstanceNetworkInterfaceSpecificationRequest in the Amazon EC2 API Reference
-
Create a launch template for an Auto Scaling group in the Amazon EC2 Auto Scaling User Guide