This is the new AWS CloudFormation Template Reference Guide. Please update your bookmarks and links. For help getting started with CloudFormation, see the AWS CloudFormation User Guide.
AWS::Batch::ServiceEnvironment
Creates a service environment for running service jobs. Service environments define capacity limits for specific service types such as SageMaker Training jobs.
Syntax
To declare this entity in your AWS CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::Batch::ServiceEnvironment", "Properties" : { "CapacityLimits" :[ CapacityLimit, ... ], "ServiceEnvironmentName" :String, "ServiceEnvironmentType" :String, "State" :String, "Tags" :{} }Key:Value, ...}
YAML
Type: AWS::Batch::ServiceEnvironment Properties: CapacityLimits:- CapacityLimitServiceEnvironmentName:StringServiceEnvironmentType:StringState:StringTags:Key:Value
Properties
CapacityLimits-
The capacity limits for the service environment. This defines the maximum resources that can be used by service jobs in this environment.
Required: Yes
Type: Array of CapacityLimit
Update requires: No interruption
ServiceEnvironmentName-
The name of the service environment.
Required: No
Type: String
Update requires: Replacement
ServiceEnvironmentType-
The type of service environment. For SageMaker Training jobs, this value is
SAGEMAKER_TRAINING.Required: Yes
Type: String
Allowed values:
SAGEMAKER_TRAININGUpdate requires: Replacement
State-
The state of the service environment. Valid values are
ENABLEDandDISABLED.Required: No
Type: String
Allowed values:
ENABLED | DISABLEDUpdate requires: No interruption
-
The tags associated with the service environment. Each tag consists of a key and an optional value. For more information, see Tagging your AWS Batch resources.
Required: No
Type: Object of String
Pattern:
.*Update requires: No interruption
Return values
Ref
When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the compute environment ARN, such as arn:aws:batch:us-east-1:555555555555:service-environment/ServiceEnvirnonment.
For more information about using the Ref function, see Ref.
Fn::GetAtt
The Fn::GetAtt intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.
For more information about using the Fn::GetAtt intrinsic function, see Fn::GetAtt.
ServiceEnvironmentArn-
The Amazon Resource Name (ARN) of the service environment.
Examples
Service Environment
The following example creates a service environment called
SageMakerTrainingEnv.
JSON
{ "ServiceEnvironment": { "Type": "AWS::Batch::ServiceEnvironment", "Properties": { "serviceEnvironmentName": "SageMakerTrainingEnv", "serviceEnvironmentType": "SAGEMAKER_TRAINING", "capacityLimits": [ { "maxCapacity": 50, "capacityUnit": "NUM_INSTANCES" } ] } } }