AWS::EC2::Host
The AWS::EC2::Host resource 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.
Topics
Syntax
To declare this entity in your AWS CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::EC2::Host", "Properties" : { "AutoPlacement" :String, "AvailabilityZone" :String, "InstanceType" :String} }
YAML
Type: AWS::EC2::Host Properties: AutoPlacement:StringAvailabilityZone:StringInstanceType:String
Properties
AutoPlacement-
Indicates if the host accepts EC2 instances with only matching configurations or if instances must also specify the host ID. Instances that don't specify a host ID can't launch onto a host with
AutoPlacementset tooff. By default, AWS CloudFormation sets this property toon. For more information, see Understanding Instance Placement and Host Affinity in the Amazon EC2 User Guide for Linux Instances.Required: No
Type: String
Update requires: No interruption
AvailabilityZone-
The Availability Zone (AZ) in which to launch the dedicated host.
Required: Yes
Type: String
Update requires: Replacement
InstanceType-
The instance type that the dedicated host accepts. Only instances of this type can be launched onto the host. For more information, see Supported Instance Types in the Amazon EC2 User Guide for Linux Instances.
Required: Yes
Type: String
Update requires: Replacement
Return Value
Ref
When the logical ID of this resource is provided to the Ref intrinsic function, Ref returns the host ID, such as h-0ab123c45d67ef89.
For more information about using the Ref function, see Ref.
Example
The following example allocates a dedicated host for c3.large instances in the us-east-1a Availability Zone.
"Host" : { "Type" : "AWS::EC2::Host", "Properties" : { "AutoPlacement" : "on", "AvailabilityZone" : "us-east-1a", "InstanceType" : "c3.large" } }
