AWS CloudFormation
User Guide (Version )

AWS::EC2::Host

Allocates a fully dedicated physical server for launching EC2 instances. Because the host is fully dedicated for your use, it can help you address compliance requirements and reduce costs by allowing you to use your existing server-bound software licenses. For more information, see Dedicated Hosts in the Amazon EC2 User Guide for Linux Instances.

Syntax

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

JSON

{ "Type" : "AWS::EC2::Host", "Properties" : { "AutoPlacement" : String, "AvailabilityZone" : String, "HostRecovery" : String, "InstanceType" : String } }

YAML

Type: AWS::EC2::Host Properties: AutoPlacement: String AvailabilityZone: String HostRecovery: String InstanceType: String

Properties

AutoPlacement

Indicates whether the host accepts any untargeted instance launches that match its instance type configuration, or if it only accepts Host tenancy instance launches that specify its unique host ID. For more information, see Understanding Instance Placement and Host Affinity in the Amazon EC2 User Guide for Linux Instances.

Default: on

Required: No

Type: String

Allowed Values: off | on

Update requires: No interruption

AvailabilityZone

The Availability Zone in which to allocate the Dedicated Host.

Required: Yes

Type: String

Update requires: Replacement

HostRecovery

Indicates whether to enable or disable host recovery for the Dedicated Host. Host recovery is disabled by default. For more information, see Host Recovery in the Amazon Elastic Compute Cloud User Guide.

Default: off

Required: No

Type: String

Allowed Values: off | on

Update requires: No interruption

InstanceType

Specifies the instance type for which to configure your Dedicated Hosts. When you specify the instance type, that is the only instance type that you can launch onto that host.

Required: Yes

Type: String

Update requires: Replacement

Return Values

Ref

When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the host ID, such as h-0ab123c45d67ef89.

For more information about using the Ref function, see Ref.

Examples

Allocating a Dedicated Host

The following example allocates a dedicated host for c3.large instances in the us-east-1a Availability Zone.

JSON

"Host" : { "Type" : "AWS::EC2::Host", "Properties" : { "AutoPlacement" : "on", "AvailabilityZone" : "us-east-1a", "InstanceType" : "c3.large" } }

YAML

Host: Type: AWS::EC2::Host Properties: AutoPlacement: on AvailabilityZone: us-east-1a InstanceType: c3.large