AWS Amazon EMR Instance Fleet
This page shows how to write Terraform and CloudFormation for Amazon EMR Instance Fleet and write them securely.
aws_emr_instance_fleet (Terraform)
The Instance Fleet in Amazon EMR can be configured in Terraform with the resource name aws_emr_instance_fleet
. The following sections describe how to use the resource and its parameters.
Example Usage from GitHub
An example could not be found in GitHub.
Parameters
-
cluster_id
required - string -
id
optional computed - string -
name
optional - string -
provisioned_on_demand_capacity
optional computed - number -
provisioned_spot_capacity
optional computed - number -
target_on_demand_capacity
optional - number -
target_spot_capacity
optional - number -
instance_type_configs
set block-
bid_price
optional - string -
bid_price_as_percentage_of_on_demand_price
optional - number -
instance_type
required - string -
weighted_capacity
optional - number -
configurations
set block-
classification
optional - string -
properties
optional - map from string to string
-
-
ebs_config
set block-
iops
optional - number -
size
required - number -
type
required - string -
volumes_per_instance
optional - number
-
-
-
launch_specifications
list block-
on_demand_specification
list block-
allocation_strategy
required - string
-
-
spot_specification
list block-
allocation_strategy
required - string -
block_duration_minutes
optional - number -
timeout_action
required - string -
timeout_duration_minutes
required - number
-
-
Explanation in Terraform Registry
Provides an Elastic MapReduce Cluster Instance Fleet configuration. See Amazon Elastic MapReduce Documentation for more information.
NOTE: At this time, Instance Fleets cannot be destroyed through the API nor web interface. Instance Fleets are destroyed when the EMR Cluster is destroyed. Terraform will resize any Instance Fleet to zero when destroying the resource.
AWS::EMR::InstanceFleetConfig (CloudFormation)
The InstanceFleetConfig in EMR can be configured in CloudFormation with the resource name AWS::EMR::InstanceFleetConfig
. The following sections describe 10 examples of how to use the resource and its parameters.
Example Usage from GitHub
Type: AWS::EMR::InstanceFleetConfig
Description: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticmapreduce-instancefleetconfig.html
Properties:
ClusterId: !Ref 'ClusterId'
InstanceFleetType: !Ref 'InstanceFleetType'
Type: AWS::EMR::InstanceFleetConfig
Description: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticmapreduce-instancefleetconfig.html
Properties:
ClusterId: !Ref 'ClusterId'
InstanceFleetType: !Ref 'InstanceFleetType'
Type: AWS::EMR::InstanceFleetConfig
Description: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticmapreduce-instancefleetconfig.html
Properties:
ClusterId: !Ref 'ClusterId'
InstanceFleetType: !Ref 'InstanceFleetType'
Type: AWS::EMR::InstanceFleetConfig
Description: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticmapreduce-instancefleetconfig.html
Properties:
ClusterId: !Ref 'ClusterId'
InstanceFleetType: !Ref 'InstanceFleetType'
Type: AWS::EMR::InstanceFleetConfig
Description: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticmapreduce-instancefleetconfig.html
Properties:
ClusterId: !Ref 'ClusterId'
InstanceFleetType: !Ref 'InstanceFleetType'
"AWS::EMR::InstanceFleetConfig.Configuration": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-instancefleetconfig-configuration.html",
"Properties": {
"Classification": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-instancefleetconfig-configuration.html#cfn-elasticmapreduce-instancefleetconfig-configuration-classification",
"PrimitiveType": "String",
"AWS::EMR::InstanceFleetConfig.Configuration": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-instancefleetconfig-configuration.html",
"Properties": {
"Classification": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-instancefleetconfig-configuration.html#cfn-elasticmapreduce-instancefleetconfig-configuration-classification",
"PrimitiveType": "String",
"AWS::EMR::InstanceFleetConfig.Configuration": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-instancefleetconfig-configuration.html",
"Properties": {
"Classification": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-instancefleetconfig-configuration.html#cfn-elasticmapreduce-instancefleetconfig-configuration-classification",
"PrimitiveType": "String",
"AWS::EMR::InstanceFleetConfig.Configuration": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-instancefleetconfig-configuration.html",
"Properties": {
"Classification": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-instancefleetconfig-configuration.html#cfn-elasticmapreduce-instancefleetconfig-configuration-classification",
"PrimitiveType": "String",
"AWS::EMR::InstanceFleetConfig.Configuration": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-instancefleetconfig-configuration.html",
"Properties": {
"Classification": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-instancefleetconfig-configuration.html#cfn-elasticmapreduce-instancefleetconfig-configuration-classification",
"PrimitiveType": "String",
Parameters
-
ClusterId
required - String -
InstanceFleetType
required - String -
InstanceTypeConfigs
optional - List of InstanceTypeConfig -
LaunchSpecifications
optional - InstanceFleetProvisioningSpecifications -
Name
optional - String -
TargetOnDemandCapacity
optional - Integer -
TargetSpotCapacity
optional - Integer
Explanation in CloudFormation Registry
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. Note The instance fleet configuration is available only in Amazon EMR versions 4.0 and later, excluding 5.
x versions.
Frequently asked questions
What is AWS Amazon EMR Instance Fleet?
AWS Amazon EMR Instance Fleet is a resource for Amazon EMR of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.
Where can I find the example code for the AWS Amazon EMR Instance Fleet?
For CloudFormation, the awslabs/aws-service-catalog-products, awslabs/aws-service-catalog-products and awslabs/aws-service-catalog-products source code examples are useful. See the CloudFormation Example section for further details.