CfnInstanceFleetConfig
- class aws_cdk.aws_emr.CfnInstanceFleetConfig(scope, id, *, cluster_id, instance_fleet_type, instance_type_configs=None, launch_specifications=None, name=None, target_on_demand_capacity=None, target_spot_capacity=None)
Bases:
CfnResource
Use
InstanceFleetConfig
to define instance fleets for an EMR cluster.A cluster can not use both instance fleets and instance groups. For more information, see Configure Instance Fleets in the Amazon EMR Management Guide . .. epigraph:
The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions. > You can currently only add a task instance fleet to a cluster with this resource. If you use this resource, CloudFormation waits for the cluster launch to complete before adding the task instance fleet to the cluster. In order to add a task instance fleet to the cluster as part of the cluster launch and minimize delays in provisioning task nodes, use the ``TaskInstanceFleets`` subproperty for the `AWS::EMR::Cluster JobFlowInstancesConfig <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-jobflowinstancesconfig.html>`_ property instead. To use this subproperty, see `AWS::EMR::Cluster <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticmapreduce-cluster.html>`_ for examples.
- See:
- CloudformationResource:
AWS::EMR::InstanceFleetConfig
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_emr as emr # configuration_property_: emr.CfnInstanceFleetConfig.ConfigurationProperty cfn_instance_fleet_config = emr.CfnInstanceFleetConfig(self, "MyCfnInstanceFleetConfig", cluster_id="clusterId", instance_fleet_type="instanceFleetType", # the properties below are optional instance_type_configs=[emr.CfnInstanceFleetConfig.InstanceTypeConfigProperty( instance_type="instanceType", # the properties below are optional bid_price="bidPrice", bid_price_as_percentage_of_on_demand_price=123, configurations=[emr.CfnInstanceFleetConfig.ConfigurationProperty( classification="classification", configuration_properties={ "configuration_properties_key": "configurationProperties" }, configurations=[configuration_property_] )], custom_ami_id="customAmiId", ebs_configuration=emr.CfnInstanceFleetConfig.EbsConfigurationProperty( ebs_block_device_configs=[emr.CfnInstanceFleetConfig.EbsBlockDeviceConfigProperty( volume_specification=emr.CfnInstanceFleetConfig.VolumeSpecificationProperty( size_in_gb=123, volume_type="volumeType", # the properties below are optional iops=123, throughput=123 ), # the properties below are optional volumes_per_instance=123 )], ebs_optimized=False ), weighted_capacity=123 )], launch_specifications=emr.CfnInstanceFleetConfig.InstanceFleetProvisioningSpecificationsProperty( on_demand_specification=emr.CfnInstanceFleetConfig.OnDemandProvisioningSpecificationProperty( allocation_strategy="allocationStrategy" ), spot_specification=emr.CfnInstanceFleetConfig.SpotProvisioningSpecificationProperty( timeout_action="timeoutAction", timeout_duration_minutes=123, # the properties below are optional allocation_strategy="allocationStrategy", block_duration_minutes=123 ) ), name="name", target_on_demand_capacity=123, target_spot_capacity=123 )
- Parameters:
scope (
Construct
) – Scope in which this resource is defined.id (
str
) – Construct identifier for this resource (unique in its scope).cluster_id (
str
) – The unique identifier of the EMR cluster.instance_fleet_type (
str
) – The node type that the instance fleet hosts. Allowed Values : TASKinstance_type_configs (
Union
[IResolvable
,Sequence
[Union
[IResolvable
,InstanceTypeConfigProperty
,Dict
[str
,Any
]]],None
]) –InstanceTypeConfigs
determine the EC2 instances that Amazon EMR attempts to provision to fulfill On-Demand and Spot target capacities. .. epigraph:: The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions.launch_specifications (
Union
[IResolvable
,InstanceFleetProvisioningSpecificationsProperty
,Dict
[str
,Any
],None
]) – The launch specification for the instance fleet.name (
Optional
[str
]) – The friendly name of the instance fleet.target_on_demand_capacity (
Union
[int
,float
,None
]) – The target capacity of On-Demand units for the instance fleet, which determines how many On-Demand instances to provision. When the instance fleet launches, Amazon EMR tries to provision On-Demand instances as specified byInstanceTypeConfig
. Each instance configuration has a specifiedWeightedCapacity
. When an On-Demand instance is provisioned, theWeightedCapacity
units count toward the target capacity. Amazon EMR provisions instances until the target capacity is totally fulfilled, even if this results in an overage. For example, if there are 2 units remaining to fulfill capacity, and Amazon EMR can only provision an instance with aWeightedCapacity
of 5 units, the instance is provisioned, and the target capacity is exceeded by 3 units. .. epigraph:: If not specified or set to 0, only Spot instances are provisioned for the instance fleet usingTargetSpotCapacity
. At least one ofTargetSpotCapacity
andTargetOnDemandCapacity
should be greater than 0. For a master instance fleet, only one ofTargetSpotCapacity
andTargetOnDemandCapacity
can be specified, and its value must be 1.target_spot_capacity (
Union
[int
,float
,None
]) – The target capacity of Spot units for the instance fleet, which determines how many Spot instances to provision. When the instance fleet launches, Amazon EMR tries to provision Spot instances as specified byInstanceTypeConfig
. Each instance configuration has a specifiedWeightedCapacity
. When a Spot instance is provisioned, theWeightedCapacity
units count toward the target capacity. Amazon EMR provisions instances until the target capacity is totally fulfilled, even if this results in an overage. For example, if there are 2 units remaining to fulfill capacity, and Amazon EMR can only provision an instance with aWeightedCapacity
of 5 units, the instance is provisioned, and the target capacity is exceeded by 3 units. .. epigraph:: If not specified or set to 0, only On-Demand instances are provisioned for the instance fleet. At least one ofTargetSpotCapacity
andTargetOnDemandCapacity
should be greater than 0. For a master instance fleet, only one ofTargetSpotCapacity
andTargetOnDemandCapacity
can be specified, and its value must be 1.
Methods
- add_deletion_override(path)
Syntactic sugar for
addOverride(path, undefined)
.- Parameters:
path (
str
) – The path of the value to delete.- Return type:
None
- add_dependency(target)
Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.
- Parameters:
target (
CfnResource
) –- Return type:
None
- add_depends_on(target)
(deprecated) Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
- Parameters:
target (
CfnResource
) –- Deprecated:
use addDependency
- Stability:
deprecated
- Return type:
None
- add_metadata(key, value)
Add a value to the CloudFormation Resource Metadata.
- Parameters:
key (
str
) –value (
Any
) –
- See:
- Return type:
None
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.
- add_override(path, value)
Adds an override to the synthesized CloudFormation resource.
To add a property override, either use
addPropertyOverride
or prefixpath
with “Properties.” (i.e.Properties.TopicName
).If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.
To include a literal
.
in the property name, prefix with a\
. In most programming languages you will need to write this as"\\."
because the\
itself will need to be escaped.For example:
cfn_resource.add_override("Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes", ["myattribute"]) cfn_resource.add_override("Properties.GlobalSecondaryIndexes.1.ProjectionType", "INCLUDE")
would add the overrides Example:
"Properties": { "GlobalSecondaryIndexes": [ { "Projection": { "NonKeyAttributes": [ "myattribute" ] ... } ... }, { "ProjectionType": "INCLUDE" ... }, ] ... }
The
value
argument toaddOverride
will not be processed or translated in any way. Pass raw JSON values in here with the correct capitalization for CloudFormation. If you pass CDK classes or structs, they will be rendered with lowercased key names, and CloudFormation will reject the template.- Parameters:
path (
str
) –The path of the property, you can use dot notation to override values in complex types. Any intermediate keys will be created as needed.
value (
Any
) –The value. Could be primitive or complex.
- Return type:
None
- add_property_deletion_override(property_path)
Adds an override that deletes the value of a property from the resource definition.
- Parameters:
property_path (
str
) – The path to the property.- Return type:
None
- add_property_override(property_path, value)
Adds an override to a resource property.
Syntactic sugar for
addOverride("Properties.<...>", value)
.- Parameters:
property_path (
str
) – The path of the property.value (
Any
) – The value.
- Return type:
None
- apply_removal_policy(policy=None, *, apply_to_update_replace_policy=None, default=None)
Sets the deletion policy of the resource based on the removal policy specified.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you’ve removed it from the CDK application or because you’ve made a change that requires the resource to be replaced.
The resource can be deleted (
RemovalPolicy.DESTROY
), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN
). In some cases, a snapshot can be taken of the resource prior to deletion (RemovalPolicy.SNAPSHOT
). A list of resources that support this policy can be found in the following link:- Parameters:
policy (
Optional
[RemovalPolicy
]) –apply_to_update_replace_policy (
Optional
[bool
]) – Apply the same deletion policy to the resource’s “UpdateReplacePolicy”. Default: truedefault (
Optional
[RemovalPolicy
]) – The default policy to apply in case the removal policy is not defined. Default: - Default value is resource specific. To determine the default value for a resource, please consult that specific resource’s documentation.
- See:
- Return type:
None
- get_att(attribute_name, type_hint=None)
Returns a token for an runtime attribute of this resource.
Ideally, use generated attribute accessors (e.g.
resource.arn
), but this can be used for future compatibility in case there is no generated attribute.- Parameters:
attribute_name (
str
) – The name of the attribute.type_hint (
Optional
[ResolutionTypeHint
]) –
- Return type:
- get_metadata(key)
Retrieve a value value from the CloudFormation Resource Metadata.
- Parameters:
key (
str
) –- See:
- Return type:
Any
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.
- inspect(inspector)
Examines the CloudFormation resource and discloses attributes.
- Parameters:
inspector (
TreeInspector
) – tree inspector to collect and process attributes.- Return type:
None
- obtain_dependencies()
Retrieves an array of resources this resource depends on.
This assembles dependencies on resources across stacks (including nested stacks) automatically.
- Return type:
List
[Union
[Stack
,CfnResource
]]
- obtain_resource_dependencies()
Get a shallow copy of dependencies between this resource and other resources in the same stack.
- Return type:
List
[CfnResource
]
- override_logical_id(new_logical_id)
Overrides the auto-generated logical ID with a specific ID.
- Parameters:
new_logical_id (
str
) – The new logical ID to use for this stack element.- Return type:
None
- remove_dependency(target)
Indicates that this resource no longer depends on another resource.
This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.
- Parameters:
target (
CfnResource
) –- Return type:
None
- replace_dependency(target, new_target)
Replaces one dependency with another.
- Parameters:
target (
CfnResource
) – The dependency to replace.new_target (
CfnResource
) – The new dependency to add.
- Return type:
None
- to_string()
Returns a string representation of this construct.
- Return type:
str
- Returns:
a string representation of this resource
Attributes
- CFN_RESOURCE_TYPE_NAME = 'AWS::EMR::InstanceFleetConfig'
- attr_id
Id
- Type:
cloudformationAttribute
- cfn_options
Options for this resource, such as condition, update policy etc.
- cfn_resource_type
AWS resource type.
- cluster_id
The unique identifier of the EMR cluster.
- creation_stack
return:
the stack trace of the point where this Resource was created from, sourced from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most node +internal+ entries filtered.
- instance_fleet_type
The node type that the instance fleet hosts.
- instance_type_configs
InstanceTypeConfigs
determine the EC2 instances that Amazon EMR attempts to provision to fulfill On-Demand and Spot target capacities.
- launch_specifications
The launch specification for the instance fleet.
- logical_id
The logical ID for this CloudFormation stack element.
The logical ID of the element is calculated from the path of the resource node in the construct tree.
To override this value, use
overrideLogicalId(newLogicalId)
.- Returns:
the logical ID as a stringified token. This value will only get resolved during synthesis.
- name
The friendly name of the instance fleet.
- node
The tree node.
- ref
Return a string that will be resolved to a CloudFormation
{ Ref }
for this element.If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through
Lazy.any({ produce: resource.ref })
.
- stack
The stack in which this element is defined.
CfnElements must be defined within a stack scope (directly or indirectly).
- target_on_demand_capacity
The target capacity of On-Demand units for the instance fleet, which determines how many On-Demand instances to provision.
- target_spot_capacity
The target capacity of Spot units for the instance fleet, which determines how many Spot instances to provision.
Static Methods
- classmethod is_cfn_element(x)
Returns
true
if a construct is a stack element (i.e. part of the synthesized cloudformation template).Uses duck-typing instead of
instanceof
to allow stack elements from different versions of this library to be included in the same stack.- Parameters:
x (
Any
) –- Return type:
bool
- Returns:
The construct as a stack element or undefined if it is not a stack element.
- classmethod is_cfn_resource(x)
Check whether the given object is a CfnResource.
- Parameters:
x (
Any
) –- Return type:
bool
- classmethod is_construct(x)
Checks if
x
is a construct.Use this method instead of
instanceof
to properly detectConstruct
instances, even when the construct library is symlinked.Explanation: in JavaScript, multiple copies of the
constructs
library on disk are seen as independent, completely different libraries. As a consequence, the classConstruct
in each copy of theconstructs
library is seen as a different class, and an instance of one class will not test asinstanceof
the other class.npm install
will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of theconstructs
library can be accidentally installed, andinstanceof
will behave unpredictably. It is safest to avoid usinginstanceof
, and using this type-testing method instead.- Parameters:
x (
Any
) – Any object.- Return type:
bool
- Returns:
true if
x
is an object created from a class which extendsConstruct
.
ConfigurationProperty
- class CfnInstanceFleetConfig.ConfigurationProperty(*, classification=None, configuration_properties=None, configurations=None)
Bases:
object
Used only with Amazon EMR release 4.0 and later.
Configuration
specifies optional configurations for customizing open-source big data applications and environment parameters. A configuration consists of a classification, properties, and optional nested configurations. A classification refers to an application-specific configuration file. Properties are the settings you want to change in that file. For more information, see Configuring Applications in the Amazon EMR Release Guide .Attributes
- classification
The classification within a configuration.
- configuration_properties
Within a configuration classification, a set of properties that represent the settings that you want to change in the configuration file.
Duplicates not allowed.
- configurations
A list of additional configurations to apply within a configuration object.
EbsBlockDeviceConfigProperty
- class CfnInstanceFleetConfig.EbsBlockDeviceConfigProperty(*, volume_specification, volumes_per_instance=None)
Bases:
object
EbsBlockDeviceConfig
is a subproperty of theEbsConfiguration
property type.EbsBlockDeviceConfig
defines the number and type of EBS volumes to associate with all EC2 instances in an EMR cluster.- Parameters:
volume_specification (
Union
[IResolvable
,VolumeSpecificationProperty
,Dict
[str
,Any
]]) – EBS volume specifications such as volume type, IOPS, size (GiB) and throughput (MiB/s) that are requested for the EBS volume attached to an Amazon EC2 instance in the cluster.volumes_per_instance (
Union
[int
,float
,None
]) – Number of EBS volumes with a specific volume configuration that are associated with every instance in the instance group.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_emr as emr ebs_block_device_config_property = emr.CfnInstanceFleetConfig.EbsBlockDeviceConfigProperty( volume_specification=emr.CfnInstanceFleetConfig.VolumeSpecificationProperty( size_in_gb=123, volume_type="volumeType", # the properties below are optional iops=123, throughput=123 ), # the properties below are optional volumes_per_instance=123 )
Attributes
- volume_specification
EBS volume specifications such as volume type, IOPS, size (GiB) and throughput (MiB/s) that are requested for the EBS volume attached to an Amazon EC2 instance in the cluster.
- volumes_per_instance
Number of EBS volumes with a specific volume configuration that are associated with every instance in the instance group.
EbsConfigurationProperty
- class CfnInstanceFleetConfig.EbsConfigurationProperty(*, ebs_block_device_configs=None, ebs_optimized=None)
Bases:
object
EbsConfiguration
determines the EBS volumes to attach to EMR cluster instances.- Parameters:
ebs_block_device_configs (
Union
[IResolvable
,Sequence
[Union
[IResolvable
,EbsBlockDeviceConfigProperty
,Dict
[str
,Any
]]],None
]) – An array of Amazon EBS volume specifications attached to a cluster instance.ebs_optimized (
Union
[bool
,IResolvable
,None
]) – Indicates whether an Amazon EBS volume is EBS-optimized.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_emr as emr ebs_configuration_property = emr.CfnInstanceFleetConfig.EbsConfigurationProperty( ebs_block_device_configs=[emr.CfnInstanceFleetConfig.EbsBlockDeviceConfigProperty( volume_specification=emr.CfnInstanceFleetConfig.VolumeSpecificationProperty( size_in_gb=123, volume_type="volumeType", # the properties below are optional iops=123, throughput=123 ), # the properties below are optional volumes_per_instance=123 )], ebs_optimized=False )
Attributes
- ebs_block_device_configs
An array of Amazon EBS volume specifications attached to a cluster instance.
- ebs_optimized
Indicates whether an Amazon EBS volume is EBS-optimized.
InstanceFleetProvisioningSpecificationsProperty
- class CfnInstanceFleetConfig.InstanceFleetProvisioningSpecificationsProperty(*, on_demand_specification=None, spot_specification=None)
Bases:
object
The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions.
InstanceTypeConfig
is a sub-property ofInstanceFleetConfig
.InstanceTypeConfig
determines the EC2 instances that Amazon EMR attempts to provision to fulfill On-Demand and Spot target capacities.Attributes
- on_demand_specification
The launch specification for On-Demand Instances in the instance fleet, which determines the allocation strategy.
The instance fleet configuration is available only in Amazon EMR releases 4.8.0 and later, excluding 5.0.x versions. On-Demand Instances allocation strategy is available in Amazon EMR releases 5.12.1 and later.
- spot_specification
The launch specification for Spot instances in the fleet, which determines the defined duration, provisioning timeout behavior, and allocation strategy.
InstanceTypeConfigProperty
- class CfnInstanceFleetConfig.InstanceTypeConfigProperty(*, instance_type, bid_price=None, bid_price_as_percentage_of_on_demand_price=None, configurations=None, custom_ami_id=None, ebs_configuration=None, weighted_capacity=None)
Bases:
object
InstanceType
config is a subproperty ofInstanceFleetConfig
.An instance type configuration specifies each instance type in an instance fleet. The configuration determines the EC2 instances Amazon EMR attempts to provision to fulfill On-Demand and Spot target capacities. .. epigraph:
The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions.
- Parameters:
instance_type (
str
) – An Amazon EC2 instance type, such asm3.xlarge
.bid_price (
Optional
[str
]) – The bid price for each Amazon EC2 Spot Instance type as defined byInstanceType
. Expressed in USD. If neitherBidPrice
norBidPriceAsPercentageOfOnDemandPrice
is provided,BidPriceAsPercentageOfOnDemandPrice
defaults to 100%.bid_price_as_percentage_of_on_demand_price (
Union
[int
,float
,None
]) – The bid price, as a percentage of On-Demand price, for each Amazon EC2 Spot Instance as defined byInstanceType
. Expressed as a number (for example, 20 specifies 20%). If neitherBidPrice
norBidPriceAsPercentageOfOnDemandPrice
is provided,BidPriceAsPercentageOfOnDemandPrice
defaults to 100%.configurations (
Union
[IResolvable
,Sequence
[Union
[IResolvable
,ConfigurationProperty
,Dict
[str
,Any
]]],None
]) –Amazon EMR releases 4.x or later. An optional configuration specification to be used when provisioning cluster instances, which can include configurations for applications and software bundled with Amazon EMR. A configuration consists of a classification, properties, and optional nested configurations. A classification refers to an application-specific configuration file. Properties are the settings you want to change in that file. For more information, see Configuring Applications .
custom_ami_id (
Optional
[str
]) – The custom AMI ID to use for the instance type.ebs_configuration (
Union
[IResolvable
,EbsConfigurationProperty
,Dict
[str
,Any
],None
]) – The configuration of Amazon Elastic Block Store (Amazon EBS) attached to each instance as defined byInstanceType
.weighted_capacity (
Union
[int
,float
,None
]) – The number of units that a provisioned instance of this type provides toward fulfilling the target capacities defined inInstanceFleetConfig
. This value is 1 for a master instance fleet, and must be 1 or greater for core and task instance fleets. Defaults to 1 if not specified.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_emr as emr # configuration_property_: emr.CfnInstanceFleetConfig.ConfigurationProperty instance_type_config_property = emr.CfnInstanceFleetConfig.InstanceTypeConfigProperty( instance_type="instanceType", # the properties below are optional bid_price="bidPrice", bid_price_as_percentage_of_on_demand_price=123, configurations=[emr.CfnInstanceFleetConfig.ConfigurationProperty( classification="classification", configuration_properties={ "configuration_properties_key": "configurationProperties" }, configurations=[configuration_property_] )], custom_ami_id="customAmiId", ebs_configuration=emr.CfnInstanceFleetConfig.EbsConfigurationProperty( ebs_block_device_configs=[emr.CfnInstanceFleetConfig.EbsBlockDeviceConfigProperty( volume_specification=emr.CfnInstanceFleetConfig.VolumeSpecificationProperty( size_in_gb=123, volume_type="volumeType", # the properties below are optional iops=123, throughput=123 ), # the properties below are optional volumes_per_instance=123 )], ebs_optimized=False ), weighted_capacity=123 )
Attributes
- bid_price
The bid price for each Amazon EC2 Spot Instance type as defined by
InstanceType
.Expressed in USD. If neither
BidPrice
norBidPriceAsPercentageOfOnDemandPrice
is provided,BidPriceAsPercentageOfOnDemandPrice
defaults to 100%.
- bid_price_as_percentage_of_on_demand_price
The bid price, as a percentage of On-Demand price, for each Amazon EC2 Spot Instance as defined by
InstanceType
.Expressed as a number (for example, 20 specifies 20%). If neither
BidPrice
norBidPriceAsPercentageOfOnDemandPrice
is provided,BidPriceAsPercentageOfOnDemandPrice
defaults to 100%.
- configurations
Amazon EMR releases 4.x or later.
An optional configuration specification to be used when provisioning cluster instances, which can include configurations for applications and software bundled with Amazon EMR. A configuration consists of a classification, properties, and optional nested configurations. A classification refers to an application-specific configuration file. Properties are the settings you want to change in that file. For more information, see Configuring Applications .
- custom_ami_id
The custom AMI ID to use for the instance type.
- ebs_configuration
The configuration of Amazon Elastic Block Store (Amazon EBS) attached to each instance as defined by
InstanceType
.
- instance_type
An Amazon EC2 instance type, such as
m3.xlarge
.
- weighted_capacity
The number of units that a provisioned instance of this type provides toward fulfilling the target capacities defined in
InstanceFleetConfig
.This value is 1 for a master instance fleet, and must be 1 or greater for core and task instance fleets. Defaults to 1 if not specified.
OnDemandProvisioningSpecificationProperty
- class CfnInstanceFleetConfig.OnDemandProvisioningSpecificationProperty(*, allocation_strategy)
Bases:
object
The launch specification for On-Demand Instances in the instance fleet, which determines the allocation strategy.
The instance fleet configuration is available only in Amazon EMR releases 4.8.0 and later, excluding 5.0.x versions. On-Demand Instances allocation strategy is available in Amazon EMR releases 5.12.1 and later.
- Parameters:
allocation_strategy (
str
) – Specifies the strategy to use in launching On-Demand instance fleets. Available options arelowest-price
andprioritized
.lowest-price
specifies to launch the instances with the lowest price first, andprioritized
specifies that Amazon EMR should launch the instances with the highest priority first. The default islowest-price
.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_emr as emr on_demand_provisioning_specification_property = emr.CfnInstanceFleetConfig.OnDemandProvisioningSpecificationProperty( allocation_strategy="allocationStrategy" )
Attributes
- allocation_strategy
Specifies the strategy to use in launching On-Demand instance fleets.
Available options are
lowest-price
andprioritized
.lowest-price
specifies to launch the instances with the lowest price first, andprioritized
specifies that Amazon EMR should launch the instances with the highest priority first. The default islowest-price
.
SpotProvisioningSpecificationProperty
- class CfnInstanceFleetConfig.SpotProvisioningSpecificationProperty(*, timeout_action, timeout_duration_minutes, allocation_strategy=None, block_duration_minutes=None)
Bases:
object
SpotProvisioningSpecification
is a subproperty of theInstanceFleetProvisioningSpecifications
property type.SpotProvisioningSpecification
determines the launch specification for Spot instances in the instance fleet, which includes the defined duration and provisioning timeout behavior. .. epigraph:The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions.
- Parameters:
timeout_action (
str
) – The action to take whenTargetSpotCapacity
has not been fulfilled when theTimeoutDurationMinutes
has expired; that is, when all Spot Instances could not be provisioned within the Spot provisioning timeout. Valid values areTERMINATE_CLUSTER
andSWITCH_TO_ON_DEMAND
. SWITCH_TO_ON_DEMAND specifies that if no Spot Instances are available, On-Demand Instances should be provisioned to fulfill any remaining Spot capacity.timeout_duration_minutes (
Union
[int
,float
]) – The Spot provisioning timeout period in minutes. If Spot Instances are not provisioned within this time period, theTimeOutAction
is taken. Minimum value is 5 and maximum value is 1440. The timeout applies only during initial provisioning, when the cluster is first created.allocation_strategy (
Optional
[str
]) – Specifies one of the following strategies to launch Spot Instance fleets:capacity-optimized
,price-capacity-optimized
,lowest-price
, ordiversified
, andcapacity-optimized-prioritized
. For more information on the provisioning strategies, see Allocation strategies for Spot Instances in the Amazon EC2 User Guide for Linux Instances . .. epigraph:: When you launch a Spot Instance fleet with the old console, it automatically launches with thecapacity-optimized
strategy. You can’t change the allocation strategy from the old console.block_duration_minutes (
Union
[int
,float
,None
]) – The defined duration for Spot Instances (also known as Spot blocks) in minutes. When specified, the Spot Instance does not terminate before the defined duration expires, and defined duration pricing for Spot Instances applies. Valid values are 60, 120, 180, 240, 300, or 360. The duration period starts as soon as a Spot Instance receives its instance ID. At the end of the duration, Amazon EC2 marks the Spot Instance for termination and provides a Spot Instance termination notice, which gives the instance a two-minute warning before it terminates. .. epigraph:: Spot Instances with a defined duration (also known as Spot blocks) are no longer available to new customers from July 1, 2021. For customers who have previously used the feature, we will continue to support Spot Instances with a defined duration until December 31, 2022.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_emr as emr spot_provisioning_specification_property = emr.CfnInstanceFleetConfig.SpotProvisioningSpecificationProperty( timeout_action="timeoutAction", timeout_duration_minutes=123, # the properties below are optional allocation_strategy="allocationStrategy", block_duration_minutes=123 )
Attributes
- allocation_strategy
capacity-optimized
,price-capacity-optimized
,lowest-price
, ordiversified
, andcapacity-optimized-prioritized
.For more information on the provisioning strategies, see Allocation strategies for Spot Instances in the Amazon EC2 User Guide for Linux Instances . .. epigraph:
When you launch a Spot Instance fleet with the old console, it automatically launches with the ``capacity-optimized`` strategy. You can't change the allocation strategy from the old console.
- See:
- Type:
Specifies one of the following strategies to launch Spot Instance fleets
- block_duration_minutes
The defined duration for Spot Instances (also known as Spot blocks) in minutes.
When specified, the Spot Instance does not terminate before the defined duration expires, and defined duration pricing for Spot Instances applies. Valid values are 60, 120, 180, 240, 300, or 360. The duration period starts as soon as a Spot Instance receives its instance ID. At the end of the duration, Amazon EC2 marks the Spot Instance for termination and provides a Spot Instance termination notice, which gives the instance a two-minute warning before it terminates. .. epigraph:
Spot Instances with a defined duration (also known as Spot blocks) are no longer available to new customers from July 1, 2021. For customers who have previously used the feature, we will continue to support Spot Instances with a defined duration until December 31, 2022.
- timeout_action
The action to take when
TargetSpotCapacity
has not been fulfilled when theTimeoutDurationMinutes
has expired;that is, when all Spot Instances could not be provisioned within the Spot provisioning timeout. Valid values are
TERMINATE_CLUSTER
andSWITCH_TO_ON_DEMAND
. SWITCH_TO_ON_DEMAND specifies that if no Spot Instances are available, On-Demand Instances should be provisioned to fulfill any remaining Spot capacity.
- timeout_duration_minutes
The Spot provisioning timeout period in minutes.
If Spot Instances are not provisioned within this time period, the
TimeOutAction
is taken. Minimum value is 5 and maximum value is 1440. The timeout applies only during initial provisioning, when the cluster is first created.
VolumeSpecificationProperty
- class CfnInstanceFleetConfig.VolumeSpecificationProperty(*, size_in_gb, volume_type, iops=None, throughput=None)
Bases:
object
VolumeSpecification
is a subproperty of theEbsBlockDeviceConfig
property type.VolumeSecification
determines the volume type, IOPS, and size (GiB) for EBS volumes attached to EC2 instances.- Parameters:
size_in_gb (
Union
[int
,float
]) – The volume size, in gibibytes (GiB). This can be a number from 1 - 1024. If the volume type is EBS-optimized, the minimum value is 10.volume_type (
str
) – The volume type. Volume types supported are gp3, gp2, io1, st1, sc1, and standard.iops (
Union
[int
,float
,None
]) – The number of I/O operations per second (IOPS) that the volume supports.throughput (
Union
[int
,float
,None
]) – The throughput, in mebibyte per second (MiB/s). This optional parameter can be a number from 125 - 1000 and is valid only for gp3 volumes.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_emr as emr volume_specification_property = emr.CfnInstanceFleetConfig.VolumeSpecificationProperty( size_in_gb=123, volume_type="volumeType", # the properties below are optional iops=123, throughput=123 )
Attributes
- iops
The number of I/O operations per second (IOPS) that the volume supports.
- size_in_gb
The volume size, in gibibytes (GiB).
This can be a number from 1 - 1024. If the volume type is EBS-optimized, the minimum value is 10.
- throughput
The throughput, in mebibyte per second (MiB/s).
This optional parameter can be a number from 125 - 1000 and is valid only for gp3 volumes.
- volume_type
The volume type.
Volume types supported are gp3, gp2, io1, st1, sc1, and standard.