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-ecs-patterns): Add capacity_provider_strategies to QueueProcessingFargateService #14781

Closed
purvesta opened this issue May 19, 2021 · 3 comments · Fixed by #15684
Closed
Labels
effort/small Small work item – less than a day of effort feature/enhancement A new API to make things easier or more intuitive. A catch-all for general feature requests. feature-request A feature should be added or improved. good first issue Related to contributions. See CONTRIBUTING.md p2

Comments

@purvesta
Copy link

❓ General Issue

I am trying to deploy a QueueProcessingFargateService that will deploy task containers to both FARGATE and FARGATE_SPOT, however the QueueProcessingFargateService L3 construct does not include a parameter option for capacity_provider_strategies like the FargateService L2 construct that I can see.

Environment

  • CDK CLI Version: 1.100.0 (build d996c6d)
  • Module Version: 1.100.0
  • Node.js Version: v16.0.0
  • OS: OSX Catalina
  • Language: Python

Other information

The task that is running in FARGATE does not need to run at full capacity all of the time, therefore the idea behind multiple capacity providers is to deploy 10 tasks that have a weight distribution across both FARGATE and FARGATE_SPOT and also scale as the queue grows in size while utilizing the cost savings of spot.

@purvesta purvesta changed the title Add capacity_provider_strategies to QueueProcessingFargateService (aws-ecs-patterns) Add capacity_provider_strategies to QueueProcessingFargateService May 19, 2021
@purvesta purvesta changed the title (aws-ecs-patterns) Add capacity_provider_strategies to QueueProcessingFargateService (aws-ecs-patterns): Add capacity_provider_strategies to QueueProcessingFargateService May 19, 2021
@ABevier
Copy link
Contributor

ABevier commented May 20, 2021

As a heads up, CloudFormation doesn't support this yet, so CDK is effectively blocked. Check out aws/containers-roadmap#631 for the Cloud Formation discussion.

@peterwoodworth peterwoodworth added feature-request A feature should be added or improved. feature/enhancement A new API to make things easier or more intuitive. A catch-all for general feature requests. p2 effort/small Small work item – less than a day of effort good first issue Related to contributions. See CONTRIBUTING.md labels Jun 2, 2021
@peterwoodworth
Copy link
Contributor

Thanks for the heads up ABevier, but this is currently supported in cloudformation. Since it is supported by an L2, it can definitely be supported by an L3.

Currently there is no way to add what you want @purvesta, so thank you for the feature request! Here's the code where the L3 creates the L2 construct:

this.service = new FargateService(this, 'QueueProcessingFargateService', {
cluster: this.cluster,
desiredCount: desiredCount,
taskDefinition: this.taskDefinition,
serviceName: props.serviceName,
minHealthyPercent: props.minHealthyPercent,
maxHealthyPercent: props.maxHealthyPercent,
propagateTags: props.propagateTags,
enableECSManagedTags: props.enableECSManagedTags,
platformVersion: props.platformVersion,
deploymentController: props.deploymentController,
securityGroups: props.securityGroups,
vpcSubnets: props.taskSubnets,
assignPublicIp: props.assignPublicIp,
circuitBreaker: props.circuitBreaker,
});

There is no capacityProviderStrategies property here, so this would have to be added here with a way to allow the user to set the property.

@mergify mergify bot closed this as completed in #15684 Aug 26, 2021
mergify bot pushed a commit that referenced this issue Aug 26, 2021
…ing service pattern (#15684)

closes #14781

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions
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.

hollanddd pushed a commit to hollanddd/aws-cdk that referenced this issue Aug 26, 2021
…ing service pattern (aws#15684)

closes aws#14781

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
TikiTDO pushed a commit to TikiTDO/aws-cdk that referenced this issue Sep 6, 2021
…ing service pattern (aws#15684)

closes aws#14781

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
david-doyle-as24 pushed a commit to david-doyle-as24/aws-cdk that referenced this issue Sep 7, 2021
…ing service pattern (aws#15684)

closes aws#14781

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort/small Small work item – less than a day of effort feature/enhancement A new API to make things easier or more intuitive. A catch-all for general feature requests. feature-request A feature should be added or improved. good first issue Related to contributions. See CONTRIBUTING.md p2
Projects
None yet
6 participants