aws-cdk
aws-cdk copied to clipboard
feat(ecs): add validation checks to memory cpu combinations of FARGATE compatible task definitions
Issue # (if applicable)
Closes #22216
Reason for this change
Adds a validation that would point out invalid CPU - Memory limits for a FARGATE compatible task definition. This is based on the document https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-cpu-memory-error.html
Description of changes
Added a validateFargateTaskDefinitionMemoryCpu
method in the base task definition and run this validation when a task definition has FARGATE in requiresCompatibilities.
This is in line with the ECS requirement that even if a task definition has EC2 compatibility (along with FARGATE), FARGATE validations apply
Description of how you validated changes
Validated the changes by providing incorrect as well as correct values, fixed all the invalid combinations that are present in the unit tests
Checklist
- [x] My code adheres to the CONTRIBUTING GUIDE and DESIGN GUIDELINES
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license
AWS CodeBuild CI Report
- CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
- Commit ID: 39ea6942ad31ba021ef08e03cead682b6b7ff125
- Result: SUCCEEDED
- Build Logs (available for 30 days)
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).
:arrow_right: PR build request submitted to test-main-pipeline
:arrow_left:
A maintainer must now check the pipeline and add the pr-linter/cli-integ-tested
label once the pipeline succeeds.
AWS CodeBuild CI Report
- CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
- Commit ID: b4f36b293052bd28700b1162ae438682f61f1442
- Result: SUCCEEDED
- Build Logs (available for 30 days)
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).
Comments on closed issues and PRs are hard for our team to see. If you need help, please open a new issue that references this one.