Skip to content

fix(ecs): Support 32 vCPU Fargate task definitions - #4668

Merged
kddejong merged 1 commit into
aws-cloudformation:mainfrom
kddejong:fix/ecs-fargate-32-vcpu
Sep 1, 2026
Merged

kddejong merged 1 commit into
aws-cloudformation:mainfrom
kddejong:fix/ecs-fargate-32-vcpu

Conversation

@kddejong

@kddejong kddejong commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Issue #, if available

N/A

Description of changes

Amazon ECS Fargate now supports a 32 vCPU (32768 CPU units) task size, but cfn-lint rejected it. Two rules needed updating:

  • E3047 (FargateCpuMemory): added the 32768 CPU tier. Per the task size docs, 32 vCPU is Linux-only and supports exactly three non-contiguous memory values — 60 GB, 120 GB, 244 GB — so the schema uses an explicit enum (61440, 122880, 249856 MiB) plus the 32 vCPU / 60|120|244 GB string forms.
  • E3048 (TaskFargateProperties): added 32768 (and the 32 vCPU string form) to the list of valid Cpu values.

Verified end-to-end that a valid 32 vCPU Fargate task now lints clean, and invalid CPU/memory combinations still error.

Description of how you validated changes

  • Added unit tests to test_ecs_fargate_cpu_memory.py (E3047) and test_ecs_task_fargate_properties.py (E3048) covering integer, vCPU/GB string, and MiB-string forms plus an invalid-memory case.
  • All 113 ECS unit tests pass; ruff check and ruff format --check clean.

Checklist

  • Have you successfully run pre-commit locally with your changes?
  • Have you added tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Add the 32768 CPU unit (32 vCPU) tier to ECS Fargate validation.

E3047 (FargateCpuMemory) now accepts the supported memory values for
32 vCPU (60 GB, 120 GB, 244 GB), and E3048 (TaskFargateProperties)
accepts 32768 as a valid Cpu value.

https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#task_size
@kddejong
kddejong merged commit 162a611 into aws-cloudformation:main Sep 1, 2026
20 checks passed
@kddejong
kddejong deleted the fix/ecs-fargate-32-vcpu branch September 1, 2026 16:31
@codecov

codecov Bot commented Sep 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.62%. Comparing base (217397c) to head (9f02028).
⚠️ Report is 10 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4668      +/-   ##
==========================================
+ Coverage   94.61%   94.62%   +0.01%     
==========================================
  Files         432      432              
  Lines       15437    15448      +11     
  Branches     2995     2995              
==========================================
+ Hits        14606    14618      +12     
  Misses        453      453              
+ Partials      378      377       -1     
Flag Coverage Δ
unittests 94.62% <ø> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants