AWS CloudFormation
User Guide (API Version 2010-05-15)
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Go to the Kindle Store to download this guide in Kindle format.Did this page help you?  Yes | No |  Tell us about it...

AWS::EC2::EIPAssociation

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.

Syntax

{
   "Type": "AWS::EC2::EIPAssociation",
   "Properties": {
      "AllocationId": String
      "EIP": String
      "InstanceId": String
      "NetworkInterfaceId": String
   }
}

Properties

AllocationId

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

EIP

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

InstanceId

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

NetworkInterfaceId

The ID of the network interface to associate with the Elastic IP address (VPC only).

Required: No

Type: String

Update requires: replacement

Return Values

Ref

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.

Examples

For AWS::EC2::EIPAssociation snippets, see Assigning an Amazon EC2 Elastic IP Using AWS::EC2::EIP Snippet.