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: Support linuxParameters in FargateTaskDefinition #30294

Closed
2 tasks
ThePlenkov opened this issue May 21, 2024 · 7 comments
Closed
2 tasks

ecs: Support linuxParameters in FargateTaskDefinition #30294

ThePlenkov opened this issue May 21, 2024 · 7 comments
Labels
effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2

Comments

@ThePlenkov
Copy link

Describe the feature

Hi!

My container requires extended shared memory and I can only set them via container linuxParameters.

It would be nice if FargateTaskDefinition and ApplicationLoadBalancedFargateService would also support this.

Thanks!

Use Case

Create a new service with extended shared memory

Proposed Solution

No response

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.137.0 (build bb90b4c)

Environment details (OS name and version, etc.)

Ubuntu 23.10

@ThePlenkov ThePlenkov added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels May 21, 2024
@pahud
Copy link
Contributor

pahud commented May 21, 2024

linuxParameters is per container definition. While it is only having limited supported with Fargate, I don't see any reason you can't use that in CDK based on the doc:

https://github.com/aws/aws-cdk/tree/168cdacf7f7505471051cef79cffe0d548c1e119/packages/aws-cdk-lib/aws-ecs#linux-parameters

Can you share your code snippets and any error messages?

@pahud pahud added response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. p2 effort/medium Medium work item – several days of effort and removed needs-triage This issue or PR still needs to be triaged. labels May 21, 2024
@pahud pahud changed the title Support linuxParameters in FargateTaskDefinition ecs: Support linuxParameters in FargateTaskDefinition May 21, 2024
@khushail khushail removed their assignment May 21, 2024
@ThePlenkov
Copy link
Author

@pahud you're right, I was using ApplicationLoadBalancedFargateService with taskImageOptions and my whole CDK code was trully minimalistic, but when I changed to taskDefinition + addContainer comibination - there I can use now Linux parameters. This is not an issue indeed

Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@ThePlenkov ThePlenkov reopened this May 22, 2024
@ThePlenkov
Copy link
Author

meanwhile here is what I got now:

Resource handler returned message: "Invalid request provided: Create TaskDefinition: Fargate compatible task definitions do not support sharedMemorySize (Service: AmazonECS; Status Code: 400; Error Code: ClientException; Request ID: 20a99bbb-f958-4499-8bbb-02d7db3a0939; Proxy: null)" (RequestToken: e029135d-fc74-59de-2d5b-c4cfb6de890e, HandlerErrorCode: InvalidRequest)

So actually the problem is not with using linuxParameters - seems like shared memory is not allowed for fargate.

I'd like to serve the image requiring at least 1000MB in shared memory. How can I do this then? Thank you!

@github-actions github-actions bot removed the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label May 22, 2024
@pahud
Copy link
Contributor

pahud commented Jun 3, 2024

In Fargate, you need to specify the required memory in the TaskDefinition. For 1GB of shared memory, you would need to select at least 1024 for the Memory value.

Closing as this is not relevant to CDK. Feel free to create a new issue if it is still relevant.

@pahud pahud closed this as completed Jun 3, 2024
Copy link

github-actions bot commented Jun 3, 2024

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@aws-cdk-automation
Copy link
Collaborator

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.

@aws aws locked as resolved and limited conversation to collaborators Jul 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2
Projects
None yet
Development

No branches or pull requests

4 participants