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 auto-placement and affinity in the Amazon EC2 User Guide.
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 EC2 User Guide.
Default:
off
Required: No
Type: String
Allowed values:
off | on
Update requires: No interruption
InstanceType
-
Specifies the instance type to be supported by the Dedicated Hosts. If you specify an instance type, the Dedicated Hosts support instances of the specified instance type only.
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