enum ComputeResourceType
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.Batch.ComputeResourceType |
Java | software.amazon.awscdk.services.batch.ComputeResourceType |
Python | aws_cdk.aws_batch.ComputeResourceType |
TypeScript (source) | @aws-cdk/aws-batch » ComputeResourceType |
Property to specify if the compute environment uses On-Demand, SpotFleet, Fargate, or Fargate Spot compute resources.
Example
const vpc = new ec2.Vpc(this, 'VPC');
const spotEnvironment = new batch.ComputeEnvironment(this, 'MySpotEnvironment', {
computeResources: {
type: batch.ComputeResourceType.SPOT,
bidPercentage: 75, // Bids for resources at 75% of the on-demand price
vpc,
},
});
Members
Name | Description |
---|---|
ON_DEMAND | Resources will be EC2 On-Demand resources. |
SPOT | Resources will be EC2 SpotFleet resources. |
FARGATE | Resources will be Fargate resources. |
FARGATE_SPOT | Resources will be Fargate Spot resources. |
ON_DEMAND
Resources will be EC2 On-Demand resources.
SPOT
Resources will be EC2 SpotFleet resources.
FARGATE
Resources will be Fargate resources.
FARGATE_SPOT
Resources will be Fargate Spot resources.
Fargate Spot uses spare capacity in the AWS cloud to run your fault-tolerant, time-flexible jobs at up to a 70% discount. If AWS needs the resources back, jobs running on Fargate Spot will be interrupted with two minutes of notification.