DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
FREEDOM251

Freedom251 › Blog › Amazon ECS

How to Make GPU Workloads Resilient on Amazon ECS with Capacity Providers and Spare Capacity

By Freedom251 Team · · 11 min read

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

Keep GPU tasks from waiting on a newly launched instance by combining three controls: declare each task’s GPU requirement, run compatible EC2 container instances behind an ECS capacity provider, and reserve measured spare capacity. That design shortens cold-start delays, but it does not make an application immune to bad deployments, driver mismatches, incompatible placement, regional shortages, or Spot interruption.

What spare capacity fixes—and what it does not

A GPU task can remain pending when every compatible ECS container instance is already using its GPUs. If the cluster must first launch an EC2 instance, wait for it to initialize, install or load the ECS agent, register with the cluster, and become eligible for placement, the task’s launch time includes that entire scale-out path. A pool of already-running instances with unused GPUs lets ECS place the task immediately instead of waiting for registration.

As an Amazon Associate I earn from qualifying purchases.

That is a capacity and recovery design, not an availability guarantee. Headroom helps with queueing caused by bursts and slow instance provisioning. It does not repair an unhealthy application, a failed deployment, a CUDA or NVIDIA driver incompatibility, an instance type that cannot satisfy the task, a shortage of the requested instance family in a Region, or an interruption that removes the only running replica. Application redundancy, graceful shutdown, retries, health checks, and tested recovery are still required.

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

The three controls

  • GPU-aware placement: ECS must know how many physical GPUs a container needs so it can reserve those devices and place the task only on eligible instances.
  • Managed EC2 capacity: an EC2 Auto Scaling group is associated with an ECS capacity provider, which can use managed scaling to add or remove instances in response to reservation.
  • Deliberate headroom: the capacity provider’s target utilization is set below 100 percent when the value of faster launches justifies paying for idle GPU capacity.

Make the task definition GPU-aware

ECS cannot reserve a GPU that the task definition never requests. In each container that needs acceleration, add a resourceRequirements entry with type set to GPU and a value equal to the number of GPUs required by that container. ECS then reserves those devices and uses the request during placement.

#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
{"containerDefinitions":[{"name":"inference","image":"example/image:tag","resourceRequirements":[{"type":"GPU","value":"1"}]}]}

The snippet is an illustrative task-definition shape; choose the image, count, CPU, memory, ports, and health checks for your workload. If the GPU requirement is omitted, ECS does not make a GPU allocation request through its GPU mechanism. A task might therefore be considered for instances that cannot provide the acceleration your application expects, or fail later when the container tries to use a device.

Use a compatible instance and AMI

Run the task on an EC2 instance family supported for the GPU model and workload. The container instances also need a compatible ECS GPU-optimized AMI, ECS agent, NVIDIA driver, and CUDA stack. Verify the combination for the exact instance family and Region before rolling it into production. GPU support and AMI contents change over time, so check the current Amazon ECS GPU documentation and the current EC2 instance documentation when selecting versions.

Avoid updating NVIDIA or CUDA drivers in place on a running fleet without a tested replacement process. AWS warns that driver updates can cause workload failures for the referenced instance families. A safer pattern is to bake and validate a new AMI, attach it to a new Auto Scaling group or launch-template version, drain the old instances, and then remove them after replacement tasks are healthy.

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

Fractional GPUs on supported G6f capacity

Where the supported G6f fractional-GPU capability fits the workload, a value such as 0.25 can place a task on a compatible fractional GPU instance. The constraints are important: only one container in a task may request a fractional GPU, and no other container in that task definition may request any GPU. Treat this as a specialized placement option, not a general way to split GPUs across arbitrary containers, and validate current support before deployment.

Build the ECS capacity-provider path

An EC2 capacity provider connects ECS placement to an Auto Scaling group. Associate the group with the cluster, enable managed scaling when ECS should adjust the group, and reference that provider in the service or task placement strategy. The provider must be associated with the cluster before a strategy can use it, and the Auto Scaling group must be able to launch instances from its current launch template, subnet, security group, IAM role, and GPU-compatible AMI.

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
  1. Prepare the Auto Scaling group. Use a launch template or configuration that starts the intended ECS GPU-optimized AMI and instance types. Confirm that instances join the correct cluster and expose their GPUs to the ECS agent.
  2. Create or associate the capacity provider. Attach the Auto Scaling group to an ECS capacity provider and associate that provider with the cluster.
  3. Enable managed scaling where appropriate. Let ECS control the provider’s scaling policy when you want placement demand to drive group capacity. Do not independently edit the scaling policy that ECS manages; competing policies can produce unpredictable scale decisions.
  4. Set the provider strategy. Configure the service or standalone-task strategy to use only providers whose instance types can satisfy the task’s GPU, CPU, memory, network, and storage requirements.
  5. Enable managed instance draining. When an instance is scheduled for termination, draining gives ECS a chance to stop or replace tasks before the instance disappears. Your application must still handle termination and shutdown within its allowed window.

Capacity providers scale infrastructure; they do not select an incompatible GPU or change a task’s resource request. A successful scale-out depends on the Auto Scaling group being able to launch a usable instance and on the new instance registering with ECS.

Understand target capacity and spare GPUs

targetCapacity is the capacity provider’s target utilization percentage. A target below 100 percent intentionally leaves capacity unreserved. AWS’s documentation gives two configuration examples: an 80 percent target corresponds to a 20 percent spare-capacity goal, while a 90 percent target corresponds to 10 percent spare capacity. These are product-setting examples, not universal GPU-sizing recommendations.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Example targetCapacity Implied spare-capacity goal What the setting favors
80% 20% More immediate room for bursts; higher idle-capacity cost
90% 10% Less idle room; greater chance that a burst waits for scale-out

With a lower target, ECS can place some standalone tasks or burst replicas on already-running instances. AWS describes this spare capacity as allowing standalone tasks to launch immediately instead of being throttled by provisioning. The trade-off is that unused GPU instances still incur compute cost while they wait for work.

Size the buffer from measurements

Choose the buffer from your response objective rather than copying an example percentage. Measure the largest normal arrival burst, the number of GPUs consumed by each replica, the time from an Auto Scaling launch request to ECS registration, typical GPU-task duration, current GPU utilization, and the cost of keeping one or more instances idle. Then set an initial buffer that covers the burst you want to absorb while the group scales.

For example, if a service normally runs six one-GPU replicas and a measured burst adds four replicas before new instances can register, the headroom objective is to make four compatible GPUs available during that interval. Whether that requires one large instance, several smaller instances, or a different target depends on the instance shapes and packing behavior in your group. Re-measure pending-task duration and idle capacity after real traffic and adjust the target.

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

The capacity provider also has an instance warm-up setting. AWS documents a default warm-up period of 300 seconds when the value is omitted. Treat that as a scaling-control default, not a promise that every GPU instance will be ready in five minutes; image size, initialization scripts, capacity availability, and ECS registration can make the observed time shorter or longer.

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.

Match instance groups to GPU task shapes

Managed scaling cannot create capacity that is physically unable to run the task. In a mixed-instance Auto Scaling group, the smallest instance type is a critical constraint: if a task’s resource requirements exceed that smallest type, ECS can leave the task in PROVISIONING without scaling the group for that task.

When to split providers

Use separate Auto Scaling groups and capacity providers when workloads have materially different minimum requirements, such as one service needing a full high-memory GPU and another needing a smaller accelerator. Give each service a strategy that references only compatible providers. Splitting prevents a small worker’s capacity policy from being treated as a solution for a task that needs a larger GPU, and it makes utilization and cost easier to attribute.

What to compare before choosing an instance mix

  • GPU model, memory, and number of GPUs per instance.
  • CPU and system memory available to each replica after platform overhead.
  • Network bandwidth, storage, and any placement constraints imposed by the application.
  • Regional availability and the time required to launch and register the instance.
  • On-Demand and Spot pricing for the exact family and Region.
  • Whether the smallest type in the group can run every task that uses the provider.

A mixed group can improve flexibility, but it also makes packing and failure analysis more complicated. If a task remains pending, inspect the task’s requested GPU count and all other resources against every type in the provider—not just the largest type advertised in the launch template.

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

Spot can lower compute cost, but AWS positions it for workloads that tolerate temporary downtime. Spot capacity may be unavailable, so a scale-out request can remain delayed even when your target capacity calls for more instances. If EC2 reclaims a running Spot instance, it provides a two-minute interruption warning.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
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

EC2 does not automatically replace unavailable Spot capacity with On-Demand capacity. If your service needs predictable recovery, keep an On-Demand baseline or use a separate capacity strategy for the replicas that must remain available. The right mix depends on whether the workload can queue, retry, checkpoint, or shed work during an interruption.

Design the application response

  • Stop accepting new work when the task receives a termination signal.
  • Finish or checkpoint work that can complete within the available shutdown window.
  • Persist model state, job progress, and output outside the instance so a replacement task can resume.
  • Return retryable failures for work that was interrupted, with idempotency keys to prevent duplicate effects.
  • Keep enough healthy replicas on another instance or capacity type to serve traffic while replacement starts.

Managed instance draining helps ECS replace tasks, but it cannot preserve in-memory state or make a two-minute warning disappear.

Validate launch and recovery behavior

Run these checks in a non-production environment that uses the same task definition, AMI, instance types, and capacity-provider settings as production. They are validation procedures, not assumptions about how your cluster will behave.

  1. Consume the buffer. Start enough GPU tasks to use the intentionally spare GPUs, then create a burst that exceeds the remaining headroom.
  2. Observe scale-out. Confirm that tasks enter a pending state, the capacity provider records the demand, the Auto Scaling group launches a compatible instance, and the instance registers with ECS.
  3. Verify placement. Check that the task lands on the intended GPU family and that ECS reserves the requested GPU count rather than merely starting the container on any available host.
  4. Test a drain. Put an instance into draining or terminate it through the same lifecycle path used for maintenance. Confirm that service replacement starts and that the application stops accepting work before shutdown.
  5. Test interruption handling. For Spot capacity, exercise checkpoint, retry, and idempotency behavior using the interruption notice path available in your environment.
  6. Repeat with the largest task shape. Ensure the provider’s smallest instance can run the task, or confirm that the service is routed to a provider whose smallest type meets the requirement.

Metrics that expose the trade-off

  • Pending-task duration from submission to placement.
  • CapacityProviderReservation and the Auto Scaling group’s desired, running, and pending capacity.
  • Healthy task count during launches, drains, and replacements.
  • GPU utilization and the amount of GPU capacity sitting idle.
  • Instance launch failures, registration failures, and tasks stuck in PROVISIONING.
  • On-Demand and Spot spend attributable to the buffer.

Look at these measurements together. A low pending time achieved by keeping a large amount of GPU capacity idle may be unacceptable financially; a highly utilized fleet that regularly leaves tasks pending may miss the service’s response objective.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshoot the common failure paths

Tasks remain in PROVISIONING while the group does not grow

First compare the task’s GPU, CPU, memory, network, and storage requests with the smallest instance type in the capacity provider. If any requirement exceeds that type, managed scaling may not add an instance for the task. Route the task to a provider with a suitable minimum size or create a dedicated group.

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

The instance launches but the task is not placed

Check that the instance joined the intended ECS cluster, the ECS agent recognizes its GPUs, and the AMI’s driver and CUDA combination supports the container. Also inspect subnet capacity, security groups, IAM permissions, and any service placement constraints. A running EC2 instance is not automatically an eligible GPU host.

Bursts still wait despite a target below 100 percent

Verify that the buffer is measured in compatible GPUs, not only in instance count. A spare CPU-heavy instance may not provide the GPU model or memory required by the task. Compare the burst size with the measured launch-and-registration interval, then lower the target or add a provider with a better-fitting shape if the cost is justified.

Replacement tasks fail during a drain

Inspect the application’s termination handling, health-check grace period, deployment limits, and available capacity on other instances. Draining schedules task movement; it does not guarantee that a replacement can start if every compatible GPU is occupied or the provider cannot obtain capacity.

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.

Spot replacement does not arrive

Expect Spot availability to vary. Keep an On-Demand baseline for the portion of the service that cannot tolerate a gap, and make interrupted work retryable or checkpointed. Do not assume EC2 will convert a failed Spot request into On-Demand capacity.

Choose an operating pattern

There is no single target percentage or provider composition that fits every GPU service. Use the response objective and workload tolerance to choose among these patterns:

  • Lower target capacity with an On-Demand baseline: best when launch latency matters more than idle cost and replicas must recover predictably.
  • Higher target capacity with minimal headroom: best when GPU instances are expensive, bursts are small or predictable, and the service can tolerate scale-out delay.
  • Separate providers for different task shapes: best when one workload needs a larger or different GPU than another and a mixed group would have an unsuitable smallest type.
  • Spot-heavy capacity with checkpointing: best when jobs can pause, retry, or resume and temporary downtime is acceptable.
  • Mixed On-Demand and Spot strategies: best when cost matters but a stable floor of serving capacity is still required.

Review the choice after traffic changes, new model sizes, AMI or driver updates, and changes in regional instance availability. A buffer that was adequate for short inference tasks can be insufficient for long-running jobs, and an instance mix that worked for one GPU generation may not satisfy the next task definition.

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

Operational checklist

  • Every GPU-using container declares its GPU requirement.
  • The task’s GPU, CPU, memory, and storage needs fit the smallest instance in its provider.
  • The ECS GPU-optimized AMI, ECS agent, NVIDIA driver, and CUDA version are validated together.
  • The Auto Scaling group is associated with the cluster through a capacity provider.
  • Managed scaling is enabled only when ECS should own the provider scaling policy.
  • The target capacity is tied to a measured burst and launch-time objective.
  • Managed instance draining is enabled for graceful replacement.
  • Spot workloads have checkpoint, retry, and idempotency behavior, or an On-Demand baseline.
  • Pending duration, capacity-provider reservation, healthy tasks, GPU utilization, launch failures, and cost are monitored.
  • Scale-out, draining, interruption, and largest-task placement are exercised before production changes.

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.

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

Amazon ECScapacity providerscloud resilienceEC2 Auto ScalingGPU workloadsSpot Instances

Leave a Reply

Your email address will not be published. Required fields are marked *

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

Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.