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): (ECS Patterns: Support Latest Task Definition Revision for ApplicationLoadBalancedFargateService) #29662

Open
2 tasks
roeysha opened this issue Mar 31, 2024 · 3 comments
Labels
@aws-cdk/aws-ecs Related to Amazon Elastic Container effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2

Comments

@roeysha
Copy link

roeysha commented Mar 31, 2024

Describe the feature

Introduce the ability to specify the latest task definition revision automatically for ApplicationLoadBalancedFargateService within ECS patterns, akin to the recent enhancement in ECS services. This would enable seamless updates without manually updating the task definition revision in the CDK code.

#26983 #27036

Use Case

Currently, when deploying applications using ApplicationLoadBalancedFargateService, specifying the latest task definition revision requires manual updates. This is cumbersome and error-prone, especially for teams frequently updating applications.

Proposed Solution

Implement a mechanism within ECS patterns, particularly for ApplicationLoadBalancedFargateService, to reference the latest task definition revision automatically. This could involve adding an option to use the latest revision within the CDK construct or a similar approach to ensure consistency across ECS services and patterns.

Other Information

While the recent update to ECS services addresses this for services directly, extending this capability to ECS patterns would streamline application deployments further, ensuring consistency and reducing manual overhead. This feature would be particularly beneficial for continuous deployment pipelines and environments where application updates are frequent.

Acknowledgements

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

CDK version used

2.134.0

Environment details (OS name and version, etc.)

MacOS Sonoma 14.2.1

@roeysha roeysha added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Mar 31, 2024
@github-actions github-actions bot added the @aws-cdk/aws-ecs Related to Amazon Elastic Container label Mar 31, 2024
@kazazor
Copy link

kazazor commented Mar 31, 2024

Supporting:

taskDefinitionRevision: TaskDefinitionRevision.LATEST

Is indeed required also for ECS patterns.

@tim-finnigan tim-finnigan self-assigned this Apr 1, 2024
@tim-finnigan tim-finnigan added investigating This issue is being investigated and/or work is in progress to resolve the issue. and removed needs-triage This issue or PR still needs to be triaged. labels Apr 1, 2024
@tim-finnigan
Copy link

Thanks for the feature request. I saw in the issue you linked (#26983) that #7863 was also referenced:

An alternative could be #7863 (where you create the task definition, construct an arn from that, import the resource, then pass that instead of the task def), but in this case we already have the task definition we want to use, so that seems to require more workarounds.

Some further discussion and review is probably needed and we can continue tracking here.

@tim-finnigan tim-finnigan added p2 effort/medium Medium work item – several days of effort and removed investigating This issue is being investigated and/or work is in progress to resolve the issue. labels Apr 1, 2024
@tim-finnigan tim-finnigan removed their assignment Apr 1, 2024
@kazazor
Copy link

kazazor commented Jul 11, 2024

Hi @tim-finnigan are there any news on this subject?
The mentioned workaround is very cumbersome as opposed to the wonderful option you introduced of

taskDefinitionRevision: TaskDefinitionRevision.LATEST

I assume this should be a quick win since CDK already supports this option for an EXS service and it only requires to expose the option also for this ECS pattern..

In the meanwhile every time we deploy a CDK change it takes us back to the previous revision that was set on the CloudFormatrion's latest CDK deployment which is a real pain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-ecs Related to Amazon Elastic Container 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

3 participants