feat(batch): switch default imageType to ECS_AL2023 for EC2 compute environments (under feature flag)#37220
feat(batch): switch default imageType to ECS_AL2023 for EC2 compute environments (under feature flag)#37220
Conversation
…te environments (under feature flag)
There was a problem hiding this comment.
The pull request linter fails with the following errors:
❌ Features must contain a change to an integration test file and the resulting snapshot.
If you believe this pull request should receive an exemption, please comment and provide a justification. A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed, add Clarification Request to a comment.
✅ A exemption request has been requested. Please wait for a maintainer's review.
|
Exemption Request This change introduces a feature flag ( The behavior change is:
An integration test would require a real AWS deployment and the change is fully covered by the two new unit tests added in this PR. Requesting an exemption from the integration test requirement. |
Closes #37205
Reason for this change
Amazon Linux 2 (AL2) is reaching EOL in June 2026. AWS Batch compute environments that do not explicitly specify
imageTypecurrently default toECS_AL2, which is deprecated. New environments should useECS_AL2023by default.Description of changes
Introduced a new feature flag
@aws-cdk/aws-batch:defaultEcsAL2023that switches the defaultimageTypefallback fromECS_AL2toECS_AL2023inManagedEc2EcsComputeEnvironment.BATCH_DEFAULT_ECS_AL2023incx-api/lib/features.tsmanaged-compute-environment.tsto useECS_AL2023when the flag is enabled@defaultcomments onimagesandimageTypepropertiesFEATURE_FLAGS.mdandrecommended-feature-flags.jsonupdated via buildA feature flag is used instead of a direct default change to avoid breaking existing stacks (behavior change in CloudFormation template).
Describe any new or updated permissions being added
None.
Description of how you validated changes
managed-compute-environment.test.ts:ECS_AL2(backward compat)ECS_AL2023Note: global coverage threshold failure is a pre-existing issue in the repository, unrelated to this change.