Menu
AWS CloudFormation
User Guide (API Version 2010-05-15)

AWS Batch ComputeEnvironment ComputeResources

The ComputeResources property type specifies details of the compute resources managed by the compute environment. This parameter is required for managed compute environments. For more information, see Compute Environments in the AWS Batch User Guide.

ComputeResources is a property of the AWS::Batch::ComputeEnvironment resource.

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

JSON

Copy
{ "SpotIamFleetRole" : String, "MaxvCpus" : Integer, "BidPercentage" : Integer, "SecurityGroupIds" : [ String, ... ], "Subnets" : [ String, ... ], "Type" : String, "MinvCpus" : Integer, "ImageId" : String, "InstanceRole" : String, "InstanceTypes" : [ String, ... ], "Ec2KeyPair" : String, "Tags" : [ Resource Tag, ... ], "DesiredvCpus" : Integer }

YAML

Copy
SpotIamFleetRole: String MaxvCpus: Integer BidPercentage: Integer SecurityGroupIds: - String Subnets: - String Type: String MinvCpus: Integer ImageId: String InstanceRole: String InstanceTypes: - String Ec2KeyPair: String Tags: - Resource Tag DesiredvCpus: Integer

Properties

For more information about each property, see ComputeResource in the AWS Batch API Reference.

SpotIamFleetRole

The Amazon Resource Name (ARN) of the Amazon EC2 Spot Fleet IAM role applied to a SPOT compute environment.

Required: No

Type: String

Update requires: Replacement

MaxvCpus

The maximum number of EC2 vCPUs that an environment can reach.

Required: Yes

Type: Integer

Update requires: No interruption

SecurityGroupIds

The EC2 security group that is associated with instances launched in the compute environment.

Required: Yes

Type: List of String values

Update requires: Replacement

BidPercentage

The minimum percentage that a Spot Instance price must be when compared with the On-Demand price for that instance type before instances are launched. For example, if your bid percentage is 20%, then the Spot price must be below 20% of the current On-Demand price for that EC2 instance.

Required: No

Type: Integer

Update requires: Replacement

Type

The type of compute environment: EC2 or SPOT.

Required: Yes

Type: String

Update requires: Replacement

Subnets

The VPC subnets into which the compute resources are launched.

Required: Yes

Type: List of String values

Update requires: Replacement

MinvCpus

The minimum number of EC2 vCPUs that an environment should maintain.

Required: Yes

Type: Integer

Update requires: No interruption

ImageId

The Amazon Machine Image (AMI) ID used for instances launched in the compute environment.

Required: No

Type: String

Update requires: Replacement

InstanceRole

The Amazon ECS instance profile applied to Amazon EC2 instances in a compute environment.

Required: Yes

Type: String

Update requires: Replacement

InstanceTypes

The instances types that may launched.

Required: Yes

Type: List of String values

Update requires: Replacement

Ec2KeyPair

The EC2 key pair that is used for instances launched in the compute environment.

Required: No

Type: String

Update requires: Replacement

Tags

Key-value pair tags to be applied to resources that are launched in the compute environment.

Required: No

Type: AWS CloudFormation Resource Tags

Update requires: Replacement

DesiredvCpus

The desired number of EC2 vCPUS in the compute environment.

Required: No

Type: Integer

Update requires: No interruption

On this page: