| « PreviousNext » | |
![]() ![]() ![]() | Did this page help you? Yes | No | Tell us about it... |
The AWS::EC2::EIPAssociation resource associates an Elastic IP address with an Amazon EC2 instance. The Elastic IP address can be an existing Elastic IP address or an Elastic IP address allocated through an AWS::EC2::EIP resource.
This type supports updates. For more information about updating stacks, see Updating AWS CloudFormation Stacks.
{
"Type": "AWS::EC2::EIPAssociation",
"Properties": {
"AllocationId": String
"EIP": String
"InstanceId": String
"NetworkInterfaceId": String
}
}Allocation ID for the VPC Elastic IP address you want to associate with an Amazon EC2 instance in your VPC.
Required: Conditional. This property must not be specified if the EIP property is specified.
Type: String
Update requires: replacement
Elastic IP address that you want to associate with the Amazon EC2 instance specified by the InstanceId property. You can specify an existing Elastic IP address or a reference to an Elastic IP address allocated with a AWS::EC2::EIP resource.
Required: Conditional. This property must not be specified if the AllocationId property is specified.
Type: String
Update requires: replacement
Instance ID of the Amazon EC2 instance that you want to associate with the Elastic IP address specified by the EIP property.
Required: No
Type: String
Update requires: replacement
The ID of the network interface to associate with the Elastic IP address (VPC only).
Required: No
Type: String
Update requires: replacement
When the logical ID of this resource is provided to the Ref intrinsic
function, it returns the resource name.
For more information about using the Ref function, see Ref.
For AWS::EC2::EIPAssociation snippets, see Assigning an Amazon EC2 Elastic IP Using AWS::EC2::EIP Snippet.