DockerAmazon ECS

ECS Fargate Ephemeral Storage Exhaustion

critical
Resource ContentionUpdated Feb 12, 2026

Fargate tasks crash with storage errors when the default 20GB ephemeral storage fills up. This manifests as repeated task restarts without resolution until storage is increased.

How to detect:

Monitor ephemeral storage usage approaching 85-90% of allocated capacity. Tasks will crash with storage errors and restart repeatedly. CloudWatch Container Insights shows StorageReadBytes and StorageWriteBytes as cumulative totals (not rates), making sustained high values indicate risk.

Recommended action:

Increase ephemeralStorage.sizeInGiB in task definition (21-200 GB range). Set CloudWatch alarms at 85% usage threshold. Implement application-level cleanup of temporary files. Monitor actual usage patterns to right-size allocation with 20-30% headroom.