Use the create-job-queue
command to create a SageMaker Training job queue.
The following example creates a basic SageMaker Training job queue that uses a
service environment:
aws batch create-job-queue \
--job-queue-name my-sm-training-fifo-jq \
--job-queue-type SAGEMAKER_TRAINING \
--priority 1 \
--service-environment-order order=1,serviceEnvironment=ExampleServiceEnvironment
Replace ExampleServiceEnvironment
with the name of
your service environment.
The command returns output similar to the following:
{
"jobQueueName": "my-sm-training-fifo-jq",
"jobQueueArn": "arn:aws:batch:region
:account
:job-queue/my-sm-training-fifo-jq"
}
After creating your job queue, verify that it was created successfully and is in a
valid state.
Use the describe-job-queues
command to view details about your job queue:
aws batch describe-job-queues --job-queues my-sm-training-fifo-jq
The command returns output similar to the following:
{
"jobQueues": [
{
"jobQueueName": "my-sm-training-fifo-jq",
"jobQueueArn": "arn:aws:batch:region
:account
:job-queue/my-sm-training-fifo-jq",
"state": "ENABLED",
"status": "VALID",
"statusReason": "JobQueue Healthy",
"priority": 1,
"computeEnvironmentOrder": [],
"serviceEnvironmentOrder": [
{
"order": 1,
"serviceEnvironment": "arn:aws:batch:region
:account
:service-environment/ExampleServiceEnvironment
"
}
],
"jobQueueType": "SAGEMAKER_TRAINING",
"tags": {},
"jobStateTimeLimitActions": []
}
]
}
Ensure that:
-
The state
is ENABLED
-
The status
is VALID
-
The statusReason
is JobQueue Healthy
-
The jobQueueType
is SAGEMAKER_TRAINING
-
The serviceEnvironmentOrder
references your service environment