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

aws-stepfunctions-tasks: Add cpu and memory parameters to EcsRunTask #30027

Open
1 of 2 tasks
kackyt opened this issue May 1, 2024 · 7 comments · May be fixed by #30140
Open
1 of 2 tasks

aws-stepfunctions-tasks: Add cpu and memory parameters to EcsRunTask #30027

kackyt opened this issue May 1, 2024 · 7 comments · May be fixed by #30140
Labels
@aws-cdk/aws-stepfunctions-tasks effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2

Comments

@kackyt
Copy link

kackyt commented May 1, 2024

Describe the feature

Add cpu and memory parameters to EcsRunTask in StepFunctions to allow flexible allocation of Ecs resources according to the situation.

Use Case

This is useful when you want to allocate resources flexibly according to the data set used in EcsTask, or when you want to increase memory when retrying from errors such as OOM.

Proposed Solution

Add cpu and memory parameters to EcsRunTask

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.139.1

Environment details (OS name and version, etc.)

client: macOS,Windows,Linux

@kackyt kackyt added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels May 1, 2024
@kackyt kackyt changed the title aws-stepfunction-tasks: Add cpu and memory parameters to EcsRunTask aws-stepfunctions-tasks: Add cpu and memory parameters to EcsRunTask May 1, 2024
@khushail khushail added investigating This issue is being investigated and/or work is in progress to resolve the issue. 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. investigating This issue is being investigated and/or work is in progress to resolve the issue. labels May 1, 2024
@khushail
Copy link
Contributor

khushail commented May 1, 2024

thanks @kackyt for submitting the request and volunteering for PR contribution.

@daschaa
Copy link
Contributor

daschaa commented May 4, 2024

Hi @kackyt - I was looking at this issue and saw that there is the containerOverrides property for the EcsRunTask. With a ContainerOverride it seems that you can override the ephemeralStorage and the cpu for an ecs task. Would this already help you/solve the issue?
For documentation reference see here: https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions_tasks.EcsRunTask.html#containeroverrides

And here for the API reference: https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_RunTask.html#API_RunTask_RequestSyntax

@kackyt
Copy link
Author

kackyt commented May 4, 2024

@daschaa
The method to allocate resources by overriding cpu and memory settings in ContainerOverrides is limited to using ec2 instances in ECS, while allocating resources for Fargate is not possible with ContainerOverrides, so I would like to resolve this feature.

@daschaa
Copy link
Contributor

daschaa commented May 5, 2024

@kackyt Thanks for the clarification! I didn‘t knew that. 👍🏼 Do you have a link to some documentation where I can find that information?

@kackyt
Copy link
Author

kackyt commented May 5, 2024

@daschaa

The task definition reference contains the following link to a description of the Fargate task.

https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#task_size

For tasks that run on Fargate (both Linux and Windows containers), this field is required and you must use one of the following values, which determines your range of supported values for the memory parameter. The table below shows the valid combinations of task-level CPU and memory.

The same applies to EcsRunTask.

@VaidSaraswat
Copy link

Hey there I believe was already addressed by this?: 5f59787.

@kackyt
Copy link
Author

kackyt commented May 7, 2024

@VaidSaraswat
This is a feature request for EcsRunTask cpu and memory field of root parameter, not a containerOverrides issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-stepfunctions-tasks effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants