ComputeEnvironmentProps

class aws_cdk.aws_batch.ComputeEnvironmentProps(*, compute_environment_name=None, compute_resources=None, enabled=None, managed=None, service_role=None)

Bases: object

(experimental) Properties for creating a new Compute Environment.

Parameters:
  • compute_environment_name (Optional[str]) – (experimental) A name for the compute environment. Up to 128 letters (uppercase and lowercase), numbers, hyphens, and underscores are allowed. Default: - CloudFormation-generated name

  • compute_resources (Union[ComputeResources, Dict[str, Any], None]) – (experimental) The details of the required compute resources for the managed compute environment. If specified, and this is an unmanaged compute environment, will throw an error. By default, AWS Batch managed compute environments use a recent, approved version of the Amazon ECS-optimized AMI for compute resources. Default: - CloudFormation defaults

  • enabled (Optional[bool]) – (experimental) The state of the compute environment. If the state is set to true, then the compute environment accepts jobs from a queue and can scale out automatically based on queues. Default: true

  • managed (Optional[bool]) – (experimental) Determines if AWS should manage the allocation of compute resources for processing jobs. If set to false, then you are in charge of providing the compute resource details. Default: true

  • service_role (Optional[IRole]) – (experimental) The IAM role used by Batch to make calls to other AWS services on your behalf for managing the resources that you use with the service. By default, this role is created for you using the AWS managed service policy for Batch. Default: - Role using the ‘service-role/AWSBatchServiceRole’ policy.

Stability:

experimental

ExampleMetadata:

infused

Example:

# vpc: ec2.Vpc

my_compute_env = batch.ComputeEnvironment(self, "ComputeEnv",
    compute_resources=batch.ComputeResources(
        image=ecs.EcsOptimizedAmi(
            generation=ec2.AmazonLinuxGeneration.AMAZON_LINUX_2
        ),
        vpc=vpc
    )
)

Attributes

compute_environment_name

(experimental) A name for the compute environment.

Up to 128 letters (uppercase and lowercase), numbers, hyphens, and underscores are allowed.

Default:
  • CloudFormation-generated name

Stability:

experimental

compute_resources

(experimental) The details of the required compute resources for the managed compute environment.

If specified, and this is an unmanaged compute environment, will throw an error.

By default, AWS Batch managed compute environments use a recent, approved version of the Amazon ECS-optimized AMI for compute resources.

Default:
  • CloudFormation defaults

Stability:

experimental

Link:

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html

enabled

(experimental) The state of the compute environment.

If the state is set to true, then the compute environment accepts jobs from a queue and can scale out automatically based on queues.

Default:

true

Stability:

experimental

managed

(experimental) Determines if AWS should manage the allocation of compute resources for processing jobs.

If set to false, then you are in charge of providing the compute resource details.

Default:

true

Stability:

experimental

service_role

(experimental) The IAM role used by Batch to make calls to other AWS services on your behalf for managing the resources that you use with the service.

By default, this role is created for you using the AWS managed service policy for Batch.

Default:
  • Role using the ‘service-role/AWSBatchServiceRole’ policy.

Stability:

experimental

Link:

https://docs.aws.amazon.com/batch/latest/userguide/service_IAM_role.html