Home icon

How to use Capacity Blocks for ML with AWS Batch

HPC Blog



The article discusses how to use Capacity Blocks for ML (CBML) with AWS Batch to reserve and manage GPU-based EC2 instances for machine learning workloads.

  • CBML allows reserving specific GPU instances for future machine learning tasks
  • AWS Batch helps manage and scale these capacity block reservations
  • Key steps include:
    • Purchasing a Capacity Block
    • Creating an EC2 launch template
    • Setting up an AWS Batch compute environment
    • Creating a job queue
  • Important considerations:
  • Match Availability Zone and instance type
  • Use BEST_FIT allocation strategy
  • Treat CBML compute environments as single-use

The approach allows researchers to efficiently manage and maximize utilization of reserved GPU instances for machine learning workloads.



Go to article

The AWS News Feed is currently looking for gold sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.

Related articles

May 18
2026
Sharing Capacity Blocks for ML Across Your AWS Organization
Jan 11
2024
Enhancing ML workflows with AWS ParallelCluster and Amazon EC2 Capacity Blocks for ML
Feb 5
2026
Amazon EC2 capacity blocks for ML can be shared across multiple accounts
Jul 2
2024
Amazon EKS natively supports EC2 capacity blocks for ML

The AWS News Feed is currently looking for silver sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.