How do I use Step Functions to create EMR clusters with different specifications?
0
I'm using Step Functions to create transient Amazon EMR clusters. For the task node, I use a Spot instance, and for timeouts, I have set up a rule to terminate the cluster. Can I use multiple spot rules in the Step Function script for creating clusters with different specifications (example: i3.8xlarge and i4.8xlarge)? Using the Amazon EMR console, its possible to mention up to five instance types in the instance fleet. Is there a sample script that can help me test with multiple instance types? I'm referencing Call Amazon EMR with Step Functions to create my cluster.
asked 2 years ago28 views
1 Answers
0
Accepted Answer
Add the JSON code similar to the following in the Step Function:
[
{
"Name": "MainFleet",
"InstanceFleetType": "MAIN",
"TargetOnDemandCapacity": 1,
"InstanceTypeConfigs": [{"InstanceType": "m3.xlarge"}]
},
{
"Name": "CoreFleet",
"InstanceFleetType": "CORE",
"TargetSpotCapacity": 11,
"TargetOnDemandCapacity": 11,
"LaunchSpecifications": {
"SpotSpecification": {
"TimeoutDurationMinutes": 20,
"TimeoutAction": "SWITCH_TO_ON_DEMAND"
}
},
"InstanceTypeConfigs": [
{
"InstanceType": "r4.xlarge",
"BidPriceAsPercentageOfOnDemandPrice": 50,
"WeightedCapacity": 1
},
{
"InstanceType": "r4.2xlarge",
"BidPriceAsPercentageOfOnDemandPrice": 50,
"WeightedCapacity": 2
},
{
"InstanceType": "r4.4xlarge",
"BidPriceAsPercentageOfOnDemandPrice": 50,
"WeightedCapacity": 4
}
]
}
]
Relevant questions
How do I use Step Functions to create EMR clusters with different specifications?
Accepted Answerasked 2 years agoAWS Step Functions: how to deal with AWS API endpoints which support pagination
Accepted Answerasked 5 months agoTrigger Step Function with API Gateway and use Fargate within Step Function?
asked a month agoEMR cluster create error: "Failed to authorize instance profile arn:aws:iam::011476750252:instance-profile/EMR_EC2_DefaultRole"
asked a month agoProgramatically detach EMR clusters from EMR Studio workspaces
asked 3 months agoOrchestrate Sqoop with Step Functions
Accepted Answerasked a year agoPackaging Lambda functions into a Cloud formation Template for sharing and deployment
asked 5 months agoCan Data Pipelines be used for running Spark jobs on EMR 6.5.0?
asked 3 months agoSpecifying Execution Name for Nested Step Functions
asked 2 years agoEMR reconfig question - Change custom AMI
Accepted Answerasked 3 years ago