Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(ecs): Incorrect ECS Fargate cpu/memory settings are not detected #22216

Closed
Labels
@aws-cdk/aws-ecs Related to Amazon Elastic Container bug This issue is a bug. effort/small Small work item – less than a day of effort p2

Comments

@watany-dev
Copy link
Contributor

Describe the bug

Now this setting succeeds, but this is the wrong cpu/memory ratio for a Fargate setting.
It may be necessary to add a checkFargateWindowsBasedTasksSize type of determination method to Fargate as well!

    const taskDefinitiongraviton2 = new ecs.FargateTaskDefinition(this, 'TaskDefGraviton2', {
      runtimePlatform: {
        operatingSystemFamily: ecs.OperatingSystemFamily.LINUX,
        cpuArchitecture: ecs.CpuArchitecture.ARM64,
      },
      cpu: 256,
      memoryLimitMiB: 122880
    });

Expected Behavior

Before cdk synth, CDK will determine the wrong configuration.

Current Behavior

Generate unsuccessful task definitions as CFn templates

Reproduction Steps

Here's the sample code I wrote above

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.41.1

Framework Version

No response

Node.js Version

any

OS

any

Language

Typescript

Language Version

No response

Other information

No response

@watany-dev watany-dev added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Sep 24, 2022
@github-actions github-actions bot added the @aws-cdk/aws-ecs Related to Amazon Elastic Container label Sep 24, 2022
@watany-dev watany-dev changed the title (ecs): (Incorrect ECS Fargate cpu/memory settings are not detected) (ecs): Incorrect ECS Fargate cpu/memory settings are not detected Sep 24, 2022
@peterwoodworth
Copy link
Contributor

It would be nice to detect this before deployment. Do you know where we can read documentation on the exact specifications for these inputs?

@peterwoodworth peterwoodworth added p2 effort/small Small work item – less than a day of effort and removed needs-triage This issue or PR still needs to be triaged. labels Sep 26, 2022
@watany-dev
Copy link
Contributor Author

The three links given in the PR below are helpful. Allowable values ​​in the 1st line, you can see whether or not there is a runtime constraint in the 2nd and 3rd lines

#22209

@watany-dev
Copy link
Contributor Author

It is also possible to define the CPU corresponding to memory as an enum, or vice versa. However, it is assumed that it is necessary to allow ″type number″ when considering backward compatibility. Therefore, the value check process is recognized with higher priority.

Copy link

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.

1 similar comment
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 30, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.