AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::EC2::Host

CfnHost

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](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-hosts-overview.html) in the *Amazon EC2 User Guide* .

Import

import { CfnHost } from 'aws-cdk-lib/aws-ec2';

Or use the module namespace:

import * as ec2 from 'aws-cdk-lib/aws-ec2';
// ec2.CfnHost

Properties

Configuration passed to the constructor as CfnHostProps.

availabilityZoneRequired
string

The Availability Zone in which to allocate the Dedicated Host.

assetIdOptional
string

The ID of the Outpost hardware asset on which the Dedicated Host is allocated.

autoPlacementOptional
string

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](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/how-dedicated-hosts-work.html#dedicated-hosts-understanding) in the *Amazon EC2 User Guide* . Default: `off`

Default: - "on"

hostMaintenanceOptional
string

Indicates whether host maintenance is enabled or disabled for the Dedicated Host.

Default: - "off"

hostRecoveryOptional
string

Indicates whether to enable or disable host recovery for the Dedicated Host. Host recovery is disabled by default. For more information, see [Host recovery](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-hosts-recovery.html) in the *Amazon EC2 User Guide* . Default: `off`

Default: - "off"

instanceFamilyOptional
string

The instance family supported by the Dedicated Host. For example, `m5` .

instanceTypeOptional
string

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.

outpostArnOptional
string

The Amazon Resource Name (ARN) of the AWS Outpost on which the Dedicated Host is allocated.

tagsOptional
CfnTag[]

Any tags assigned to the Dedicated Host.

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Get the Amazon EC2 Cheat Sheet

Everything you need to know about Amazon EC2 on one page. HD quality, print-friendly.

Download Free Infographic