ComputeResourceType

class aws_cdk.aws_batch.ComputeResourceType(value)

Bases: Enum

(experimental) Property to specify if the compute environment uses On-Demand, SpotFleet, Fargate, or Fargate Spot compute resources.

Stability

experimental

ExampleMetadata

infused

Example:

vpc = ec2.Vpc(self, "VPC")

spot_environment = batch.ComputeEnvironment(self, "MySpotEnvironment",
    compute_resources=batch.ComputeResources(
        type=batch.ComputeResourceType.SPOT,
        bid_percentage=75,  # Bids for resources at 75% of the on-demand price
        vpc=vpc
    )
)

Attributes

FARGATE

(experimental) Resources will be Fargate resources.

Stability

experimental

FARGATE_SPOT

(experimental) 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.

Stability

experimental

ON_DEMAND

(experimental) Resources will be EC2 On-Demand resources.

Stability

experimental

SPOT

(experimental) Resources will be EC2 SpotFleet resources.

Stability

experimental