Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

To keep GPU tasks from waiting on EC2 capacity, run them on GPU-compatible ECS container instances, declare each container’s GPU requirement, and attach an EC2 Auto Scaling group to an ECS capacity provider with managed scaling. Deliberate spare capacity lets bursts start on already-registered instances instead of waiting for an instance launch and ECS registration. It improves launch latency, but it does not prevent application defects, incompatible placement, regional shortages, or instance interruptions.

What spare capacity fixes—and what it does not

A GPU task can remain pending even when the ECS service is configured correctly. If every compatible container instance has its GPUs allocated, ECS must wait for the Auto Scaling group to launch another instance, for that instance to boot, register with the cluster, pass its health checks, and become a placement candidate. The queue is especially visible when a burst arrives or when a replacement task is needed after an instance is drained.

Spare capacity changes that timing. With at least one compatible GPU available, ECS can place a task immediately on an existing instance. AWS describes this as allowing standalone tasks to launch without being throttled by cluster provisioning. The trade-off is that idle GPU instances cost money while they wait for work.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Headroom is not a complete availability guarantee. An application can still fail its health check, request a GPU shape that no provider can supply, encounter a driver or CUDA mismatch, lose an instance to hardware failure, or face a regional shortage. Spot capacity can also be reclaimed. Treat spare capacity as protection against capacity-provisioning delay, then add deployment, draining, retry, checkpoint, and monitoring practices for the other failure modes.

#1 Best Overall
Sale
ASUS Dual Radeon RX 9060 XT 16GB GDDR6 Gaming Graphics Card | PCIe 5.0, HDMI 2.1b, DisplayPort 2.1a, 2.5-slot design, Axial-tech Fans, 0dB Technology
  • Axial-tech fans now feature a smaller fan hub that facilitates longer blades and a barrier ring that increases downward air pressure
  • 2.5-slot design allows for greater build compatibility while maintaining cooling performance
  • 0dB technology lets you enjoy light gaming in relative silence
  • Dual BIOS switch lets you toggle between Quiet and Performance BIOS profiles
  • Dual ball fan bearings last up to twice as long as sleeve bearing designs

Make ECS understand the GPU requirement

Use compatible EC2 container instances

GPU tasks in ECS on EC2 require an instance family with the GPU model, GPU memory, CPU, memory, network, and storage characteristics your container needs. Use an ECS GPU-optimized AMI or another explicitly supported image with a compatible ECS agent, NVIDIA driver, and container runtime. GPU support is tied to the complete AMI, agent, and driver combination, not just the instance’s hardware label.

Verify the supported instance families and current AMI guidance before creating or updating a launch template. AWS warns that in-place NVIDIA or CUDA driver updates can cause workload failures for affected instance families. Prefer a tested, immutable AMI rollout: build a new image, validate it with the exact task image, and replace instances through the Auto Scaling group rather than modifying drivers on running production hosts.

Declare GPU devices in every relevant container

ECS reserves physical GPU resources only when the task definition declares them. Add a resourceRequirements entry with type set to GPU and a value equal to the number of devices the container needs.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
{
  "containerDefinitions": [
    {
      "name": "inference",
      "image": "example.registry/inference:2026-10",
      "resourceRequirements": [
        { "type": "GPU", "value": "1" }
      ],
      "essential": true
    }
  ]
}

The example requests one GPU for the inference container. If you omit the requirement, ECS does not treat that container as requesting GPU allocation through its GPU mechanism. The task may therefore be placed without reserving a device, or fail later when the application tries to use one.

Declare CPU and memory requirements as carefully as GPU count. A provider can have an unused GPU but still be unable to place a task whose CPU, memory, network, or storage requirements do not fit.

Account for fractional GPU placement

Where the current ECS and instance-family support permits fractional GPU capacity on G6f instances, a value such as 0.25 can place a container on a compatible fractional-GPU instance. The constraints are significant: only one container in a task may request a fractional GPU, and no other container in that task definition may request any GPU. Confirm current G6f support, AMI requirements, and regional availability before relying on fractional placement.

Rank #2
GIGABYTE GeForce RTX 5070 Ti Gaming OC 16G Graphics Card, 16GB 256-bit GDDR7, PCIe 5.0, WINDFORCE Cooling System, GV-N507TGAMING OC-16GD Video Card
  • Powered by the NVIDIA Blackwell architecture and DLSS 4
  • Powered by GeForce RTX 5070 Ti
  • Integrated with 16GB GDDR7 256bit memory interface
  • PCIe 5.0
  • WINDFORCE cooling system

Attach an Auto Scaling group to an ECS capacity provider

Build the capacity path

An EC2 capacity provider connects an ECS cluster to an Auto Scaling group. The group supplies instances; ECS uses the provider to reason about available capacity and, when managed scaling is enabled, adjust the group toward the configured target.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Create or select an Auto Scaling group whose launch template uses the tested ECS GPU-compatible AMI. Include the instance profile, cluster configuration, security groups, subnets, and user data needed for the ECS agent to register in the intended cluster.
  2. Create an ECS capacity provider associated with that Auto Scaling group. Enable managed scaling if ECS should control scale-out and scale-in for tasks using the provider.
  3. Associate the capacity provider with the ECS cluster before referencing it in a service or run-task capacity-provider strategy.
  4. Configure the service or task strategy to use the provider. Check that every provider in the strategy can run the task’s GPU, CPU, memory, and other resource requirements.
  5. Confirm that the Auto Scaling group can actually launch the selected GPU types in the chosen subnets and Availability Zones. A correct ECS strategy cannot overcome an EC2 launch-template error, quota limit, or unavailable capacity.

When managed scaling is enabled, do not independently replace or edit the scaling policy that ECS manages. Manual changes can conflict with the capacity provider’s control loop and make pending-task behavior difficult to diagnose.

Enable managed instance draining

Use managed instance draining where available. When ECS or the Auto Scaling group is terminating an instance, draining gives running tasks an opportunity to stop gracefully and lets a service launch replacements before the host disappears. Your application still needs a shutdown path: stop accepting new work, finish or checkpoint in-flight work, release resources, and exit within the task’s allowed stop period.

Draining helps planned replacement and scale-in; it cannot make a sudden host failure graceful. Services should maintain the desired task count and have a retry or recovery path for work interrupted without a clean shutdown.

Choose target capacity to meet a launch-time objective

targetCapacity expresses the percentage of capacity the capacity provider should target as utilized. A lower target reserves more unused capacity. AWS gives two configuration examples: an 80% target corresponds to a 20% spare-capacity goal, while a 90% target corresponds to 10% spare capacity. These are product-setting examples, not universal GPU recommendations.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Target capacity Spare-capacity interpretation Operational effect
80% 20% spare capacity More room for bursts and standalone tasks before scale-out is needed; higher idle-capacity cost.
90% 10% spare capacity Less idle capacity; a burst is more likely to wait for new instances and ECS registration.

The API documentation also describes a default instance warm-up period of 300 seconds when the warm-up value is omitted. Warm-up affects how quickly newly launched instances are counted by managed scaling; it does not mean every GPU instance will be ready in exactly that time. AMI boot duration, driver initialization, registration, health checks, and EC2 availability all contribute to real launch latency.

Rank #3
GIGABYTE GeForce RTX 5060 WINDFORCE OC 8G Graphics Card, Cooling System, 8GB 128-bit GDDR7, PCIe 5.0, Manufactured by NVIDIA, DisplayPort & HDMI - Video Output Interface, GV-N5060WF2OC-8GD Video Card
  • Powered by the NVIDIA Blackwell architecture and DLSS 4
  • Powered by GeForce RTX 5060
  • Integrated with 8GB GDDR7 128bit memory interface
  • PCIe 5.0
  • WINDFORCE cooling system

A practical sizing method

Start with the response objective rather than a preset percentage. Measure the largest normal task-arrival burst, the number of GPUs consumed by one task, the time from an EC2 launch request to a registered healthy ECS instance, typical GPU-task duration, and the budget for idle GPU instances.

  1. Measure pending-task duration during ordinary deployments and bursts. Separate time spent waiting for a placement-compatible GPU from time spent pulling images or starting the container.
  2. Estimate how many tasks can arrive before the Auto Scaling group adds usable instances. Include the GPU count per task and the smallest provider instance shape that can host it.
  3. Set an initial headroom goal large enough to absorb the desired burst during that scale-out interval. Express it as a target capacity, but document the workload assumptions behind it.
  4. Observe CapacityProviderReservation, pending-task age, healthy task count, GPU utilization, instance launch failures, and idle-instance cost.
  5. Lower the target if tasks regularly wait for capacity and idle cost is acceptable; raise it if GPUs sit idle and launch latency remains within the service objective.

A fixed percentage cannot account for every GPU workload. A long-running batch task, a short inference request, and a service with a once-a-day burst need different buffers. AWS does not publish a universal GPU-specific spare-capacity percentage in the referenced guidance.

Match provider composition to task shapes

The smallest instance type sets a hard boundary

In a mixed-instance Auto Scaling group, the smallest instance type matters to ECS managed scaling. If a task requires more GPU, CPU, or memory than that smallest type provides, ECS can leave the task in PROVISIONING without scaling the group for that task. Adding larger types to the same group does not reliably solve a placement requirement that the provider’s minimum shape cannot satisfy.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For example, a task requiring two GPUs should not share a provider whose smallest allowed instance has only one. A fractional-GPU task may also need a provider restricted to compatible fractional hardware. Keep the minimum shape in every provider compatible with every task that can select it.

Separate incompatible workloads

Use separate Auto Scaling groups and capacity providers when task classes have materially different minimum requirements, such as:

  • Different GPU models or GPU-memory requirements.
  • Different GPU counts per task.
  • CPU or memory requirements that exclude the smallest type in a shared group.
  • Different interruption tolerances, such as latency-sensitive inference versus retryable batch processing.
  • Different launch-template, AMI, driver, network, or storage requirements.

Then give each service a strategy containing only providers that can run its task. This reduces the chance that a task appears schedulable at the cluster level but remains pending because no selected provider can satisfy its complete resource vector.

Rank #4
Sale
GIGABYTE Radeon RX 9070 XT Gaming OC 16G Graphics Card, PCIe 5.0, 16GB GDDR6, GV-R9070XTGAMING OC-16GD Video Card
  • Powered by Radeon RX 9070 XT
  • WINDFORCE Cooling System
  • Hawk Fan
  • Server-grade Thermal Conductive Gel
  • RGB Lighting

Evaluate more than GPU count

For each candidate instance type, compare GPU model and memory, GPUs per host, CPU and system memory per replica, network bandwidth, local or attached storage, regional availability, expected launch time, and cost. Instance specifications and availability change, so check current EC2 documentation and account quotas when making procurement decisions. A provider that is inexpensive per hour may still be unsuitable if its GPU memory cannot load the model or if its launch capacity is unreliable in the required Region.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use Spot as an interruption policy, not as guaranteed spare capacity

Spot can reduce compute cost, but AWS positions it for workloads that tolerate temporary downtime. Spot capacity may be unavailable when the Auto Scaling group requests it, and launch attempts can be delayed. If EC2 reclaims a Spot instance, the instance receives a two-minute interruption warning.

Design the task for that warning window:

  • Stop accepting new work as soon as interruption is detected.
  • Checkpoint model state, batch progress, or other restart information when the workload supports it.
  • Make queued work retryable and idempotent so a replacement task can safely resume it.
  • Use ECS service replacement and health checks to restore the desired task count.
  • Record whether an interruption caused lost, duplicated, or merely delayed work.

EC2 does not automatically replace unavailable Spot capacity with On-Demand capacity. If a service needs predictable recovery, maintain an intentional On-Demand baseline or use a separate On-Demand capacity provider in its strategy. Keep interruption-tolerant batch work on Spot only when its retry and checkpoint behavior has been established.

Design the service for replacement and recovery

Keep desired capacity meaningful

An ECS service should maintain enough healthy replacement tasks for its availability objective. Spare instances help a replacement task start quickly, but the service still needs a deployment configuration that permits replacement, a health check that detects real readiness, and application code that can reconnect to dependencies.

GPU initialization can take longer than a basic process check. Make the container health check reflect model loading and readiness rather than merely confirming that a process exists. Otherwise ECS can count a task as healthy before it can serve traffic, masking slow or failed GPU initialization.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Make shutdown safe

On drain or interruption, stop accepting new requests, finish work that can complete within the termination window, and persist progress that cannot. Avoid assuming that a GPU context or in-memory queue will survive host replacement. Externalize durable job state and make startup reconstruct the required model and configuration from known sources.

Best Value
ASUS PRIME Radeon RX 9070 XT 16GB GDDR6 OC Edition Gaming Graphics Card | PCIe 5.0, HDMI/DP 2.1, 2.5-slot, Axial-tech Fans, Dual-ball Fan Bearings, dual BIOS, ASUS GPU Guard
  • Axial-tech fans now feature a smaller fan hub that facilitates longer blades and a barrier ring that increases downward air pressure
  • Phase-change GPU thermal pad helps ensure optimal heat transfer, lowering GPU temperatures for enhanced performance and reliability
  • 2.5-slot design allows for greater build compatibility while maintaining cooling performance
  • Dual-ball fan bearings last up to twice as long as standard conventional sleeve bearings designs
  • 0dB technology lets you enjoy light gaming in relative silence

Protect deployments from driver drift

Pin and test the driver, CUDA runtime, framework, and model image combination. Roll out AMI changes through a new Auto Scaling group or controlled instance replacement, then observe task startup and GPU allocation before increasing the group’s share of production traffic. This prevents an otherwise healthy capacity provider from rapidly launching incompatible hosts.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Validate the design with controlled failure tests

Run these exercises in your own non-production environment first, then repeat during an approved production test window. They are validation procedures, not guarantees that every AWS Region or instance family behaves identically.

  1. Consume the buffer. Start enough GPU tasks to use the intended spare capacity. Confirm that tasks placed within the buffer start without waiting for a new EC2 host.
  2. Trigger scale-out. Submit a burst larger than the buffer. Verify that tasks enter a pending state, the capacity provider requests scale-out, new instances register, and tasks move from placement to running.
  3. Check actual placement. Inspect task and container metadata to confirm that the GPU count is reserved and that the selected instance satisfies the GPU model, memory, CPU, and memory requirements.
  4. Test a drain. Put an instance into draining or perform an approved termination. Observe task stop behavior, replacement timing, service health, and whether in-flight work is completed or resumed safely.
  5. Test interruption handling. For a Spot provider, exercise the application’s checkpoint, retry, and shutdown path. Confirm that a two-minute warning does not create corrupt or permanently lost work.
  6. Test a bad candidate. Temporarily use a provider whose smallest instance cannot fit the task. Confirm that monitoring identifies the resulting PROVISIONING condition and that operators know which provider or task requirement must change.

Monitor the signals that explain waiting

  • Pending-task count and age, separated by service and task definition.
  • CapacityProviderReservation and Auto Scaling group desired, current, and healthy capacity.
  • GPU utilization and allocated GPU count on each instance.
  • EC2 launch errors, quota errors, insufficient-capacity responses, and failed ECS registrations.
  • Task health, replacement rate, stop reasons, and deployment rollout status.
  • Idle GPU-instance hours and their associated cost.

Correlating these signals distinguishes a scheduling shortage from image-pull delay, application startup failure, a bad AMI, or an EC2 capacity problem.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Troubleshoot common failure modes

Tasks remain pending although instances exist

Check whether the task definition requests a GPU, whether the requested count fits an available instance, and whether CPU, memory, ports, network, and storage also fit. Then verify that the service strategy includes the provider containing those instances. An instance with a different GPU model or insufficient GPU memory is not a valid placement target.

Tasks stay in PROVISIONING and the group does not grow

Inspect the smallest instance type in the provider. If the task cannot fit that type, managed scaling may not add capacity for it. Move the task to a provider with a compatible minimum shape or change the task requirements after confirming that the workload can run on the new shape.

Scale-out occurs, but tasks still wait too long

Measure the complete path: EC2 launch, AMI boot, driver readiness, ECS registration, image pull, and application initialization. Increase deliberate headroom if the service objective values immediate placement more than idle cost. Also check regional GPU availability, subnet capacity, account quotas, and launch-template errors; spare capacity cannot compensate for a provider that cannot launch.

A replacement task starts but cannot use the GPU

Compare the replacement host’s AMI, ECS agent, NVIDIA driver, CUDA runtime, and container image with the last known-good combination. Confirm that the task’s resourceRequirements entry is present in the deployed revision and that no fractional-GPU rule was violated.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Spot tasks disappear during processing

Use the interruption signal to stop intake, checkpoint progress, and retry work on a replacement task. If the workload cannot tolerate a two-minute warning or temporary capacity unavailability, move its baseline to On-Demand capacity rather than treating Spot as an automatic fallback.

Choose among the main design options

Higher versus lower target capacity

  • Lower target: More ready GPU capacity, faster burst placement, and greater idle cost. Use when launch latency is expensive or bursts are difficult to predict.
  • Higher target: Better average utilization and lower idle cost, with more requests waiting for scale-out. Use when work is queueable and the launch-time objective is relaxed.

On-Demand versus Spot

  • On-Demand baseline: More predictable recovery and no Spot reclamation event, at a higher compute cost.
  • Spot capacity: Lower cost potential, but capacity can be unavailable and running instances can receive a two-minute interruption warning. Requires checkpointing, retry, and graceful shutdown behavior.

One mixed provider versus separate providers

  • One mixed group: Fewer provider objects, but every task must fit the smallest type and share compatible AMI, driver, and interruption assumptions.
  • Separate groups: Clearer placement boundaries for GPU shapes and workload classes, with more infrastructure and monitoring to operate.

Implementation checklist

  • Use a currently supported GPU instance family and tested ECS GPU-compatible AMI.
  • Declare each container’s GPU count with resourceRequirements and type GPU.
  • Validate the complete GPU, CPU, memory, network, storage, driver, and CUDA fit.
  • Associate the Auto Scaling group with an ECS capacity provider before using it in a strategy.
  • Enable managed scaling when ECS should control provider capacity, and avoid conflicting manual policies.
  • Set target capacity from measured burst size, launch latency, task duration, and idle-cost tolerance.
  • Ensure the smallest instance type in each provider can run every task that selects it.
  • Separate providers for incompatible GPU shapes, AMIs, or interruption requirements.
  • Enable managed instance draining and implement application-level graceful shutdown.
  • Use Spot only with tested checkpoint and retry behavior; keep an On-Demand baseline when recovery must be predictable.
  • Monitor pending-task age, capacity-provider reservation, GPU utilization, launch failures, replacements, and idle cost.
  • Exercise burst, drain, termination, and interruption scenarios before relying on the design.

Bottom line

A resilient ECS GPU design combines GPU-aware task definitions, compatible EC2 images and instance shapes, capacity providers with managed Auto Scaling, and deliberately measured headroom. Set the buffer to meet a stated launch-time objective, not because 80% or 90% is inherently correct. Then make draining, checkpointing, retries, and observability part of the service itself. Spare capacity removes one important queue—the wait for a new compatible host—but resilience comes from addressing every remaining way a GPU task can fail or be interrupted.

Quick Recap

SaleBestseller No. 1
ASUS Dual Radeon RX 9060 XT 16GB GDDR6 Gaming Graphics Card | PCIe 5.0, HDMI 2.1b, DisplayPort 2.1a, 2.5-slot design, Axial-tech Fans, 0dB Technology
ASUS Dual Radeon RX 9060 XT 16GB GDDR6 Gaming Graphics Card | PCIe 5.0, HDMI 2.1b, DisplayPort 2.1a, 2.5-slot design, Axial-tech Fans, 0dB Technology
0dB technology lets you enjoy light gaming in relative silence; Dual BIOS switch lets you toggle between Quiet and Performance BIOS profiles
$529.00
Bestseller No. 2
GIGABYTE GeForce RTX 5070 Ti Gaming OC 16G Graphics Card, 16GB 256-bit GDDR7, PCIe 5.0, WINDFORCE Cooling System, GV-N507TGAMING OC-16GD Video Card
GIGABYTE GeForce RTX 5070 Ti Gaming OC 16G Graphics Card, 16GB 256-bit GDDR7, PCIe 5.0, WINDFORCE Cooling System, GV-N507TGAMING OC-16GD Video Card
Powered by the NVIDIA Blackwell architecture and DLSS 4; Powered by GeForce RTX 5070 Ti; Integrated with 16GB GDDR7 256bit memory interface
$1,249.99
Bestseller No. 3
GIGABYTE GeForce RTX 5060 WINDFORCE OC 8G Graphics Card, Cooling System, 8GB 128-bit GDDR7, PCIe 5.0, Manufactured by NVIDIA, DisplayPort & HDMI - Video Output Interface, GV-N5060WF2OC-8GD Video Card
GIGABYTE GeForce RTX 5060 WINDFORCE OC 8G Graphics Card, Cooling System, 8GB 128-bit GDDR7, PCIe 5.0, Manufactured by NVIDIA, DisplayPort & HDMI - Video Output Interface, GV-N5060WF2OC-8GD Video Card
Powered by the NVIDIA Blackwell architecture and DLSS 4; Powered by GeForce RTX 5060; Integrated with 8GB GDDR7 128bit memory interface
$495.99
SaleBestseller No. 4
GIGABYTE Radeon RX 9070 XT Gaming OC 16G Graphics Card, PCIe 5.0, 16GB GDDR6, GV-R9070XTGAMING OC-16GD Video Card
GIGABYTE Radeon RX 9070 XT Gaming OC 16G Graphics Card, PCIe 5.0, 16GB GDDR6, GV-R9070XTGAMING OC-16GD Video Card
Powered by Radeon RX 9070 XT; WINDFORCE Cooling System; Hawk Fan; Server-grade Thermal Conductive Gel
$814.50
Bestseller No. 5
ASUS PRIME Radeon RX 9070 XT 16GB GDDR6 OC Edition Gaming Graphics Card | PCIe 5.0, HDMI/DP 2.1, 2.5-slot, Axial-tech Fans, Dual-ball Fan Bearings, dual BIOS, ASUS GPU Guard
ASUS PRIME Radeon RX 9070 XT 16GB GDDR6 OC Edition Gaming Graphics Card | PCIe 5.0, HDMI/DP 2.1, 2.5-slot, Axial-tech Fans, Dual-ball Fan Bearings, dual BIOS, ASUS GPU Guard
0dB technology lets you enjoy light gaming in relative silence; Dual BIOS switch lets you toggle between Quiet and Performance BIOS profiles
$829.99

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.