Skip to content

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

@watany-dev

Description

@watany-dev

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-ecsRelated to Amazon Elastic ContainerbugThis issue is a bug.effort/smallSmall work item – less than a day of effortp2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions