enum OnDemandAllocationStrategy
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.StepFunctions.Tasks.EmrCreateCluster.OnDemandAllocationStrategy |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsstepfunctionstasks#EmrCreateCluster_OnDemandAllocationStrategy |
Java | software.amazon.awscdk.services.stepfunctions.tasks.EmrCreateCluster.OnDemandAllocationStrategy |
Python | aws_cdk.aws_stepfunctions_tasks.EmrCreateCluster.OnDemandAllocationStrategy |
TypeScript (source) | aws-cdk-lib » aws_stepfunctions_tasks » EmrCreateCluster » OnDemandAllocationStrategy |
On-Demand Allocation Strategies.
Specifies the strategy to use in launching On-Demand instance fleets. Currently, the only option is "lowest-price" (the default), which launches the lowest price first.
Example
new tasks.EmrCreateCluster(this, 'OnDemandSpecification', {
instances: {
instanceFleets: [{
instanceFleetType: tasks.EmrCreateCluster.InstanceRoleType.MASTER,
launchSpecifications: {
onDemandSpecification: {
allocationStrategy: tasks.EmrCreateCluster.OnDemandAllocationStrategy.LOWEST_PRICE,
},
},
}],
},
name: 'OnDemandCluster',
integrationPattern: sfn.IntegrationPattern.RUN_JOB,
});
new tasks.EmrCreateCluster(this, 'SpotSpecification', {
instances: {
instanceFleets: [{
instanceFleetType: tasks.EmrCreateCluster.InstanceRoleType.MASTER,
launchSpecifications: {
spotSpecification: {
allocationStrategy: tasks.EmrCreateCluster.SpotAllocationStrategy.CAPACITY_OPTIMIZED,
timeoutAction: tasks.EmrCreateCluster.SpotTimeoutAction.TERMINATE_CLUSTER,
timeout: Duration.minutes(5),
},
},
}],
},
name: 'SpotCluster',
integrationPattern: sfn.IntegrationPattern.RUN_JOB,
});
Members
| Name | Description |
|---|---|
| LOWEST_PRICE | Lowest-price, which launches instances from the lowest priced pool that has available capacity. |
| PRIORITIZED | Prioritized, which launches instances based on the priority that you assign to each instance type configuration. |
LOWEST_PRICE
Lowest-price, which launches instances from the lowest priced pool that has available capacity.
PRIORITIZED
Prioritized, which launches instances based on the priority that you assign to each instance type configuration.
When using this strategy, you must configure the priority for at least one instance type in the fleet.

.NET
Go
Java
Python
TypeScript (