-
Notifications
You must be signed in to change notification settings - Fork 320
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] [request]: Update (add/remove) ALB TargetGroups on a ECS Service that has been already created #712
Comments
One use case here is for custom deployment controllers. By allowing a service update we can attach it to a non production load bearing TG, run smoke tests, then move it over to the production TG attached to the ALB/NLB |
More information I can add - While updating a service's network configuration and adding a TG, you get an error: Documentation is also misleading:
But it is described in ECS "Updating a service":
Question is about the 3rd point I've quoted (4th in the page), why? :( |
This is one of the biggest painpoints using ECS on Fargate |
Can anyone try detaching the target group from one load balancer and attaching it to another load balancer? I just found that using this method, you can basically change the load balancer endpoint. You don't even need to modify the existing ECS service. |
Amazon ECS UpdateService API now supports updates for the following parameters: loadBalancers, propagateTags, enableECSManagedTags, and serviceRegistries; see what's new post for details: |
When updating the Load Balancer field and using a classic load balancer, I get |
Hi @kevinscholz could you share more details about your configuration. Are you trying to add a load balancer to a service that did not have one previously? It would be great if you could also DM me your service details and updateService payload. Thanks. |
It appeared when updating the Terraform AWS Provider. One of the tests failed, which basically first creates a classic load balancer and attaches it to a service and then updates the container name and container port in the load balancer attachment. The interesting part is this:
Do you need additional information? Not sure how to reach you via DM. |
Hi @kevinscholz We're looking into it. We'd need some more details to investigate (viz. account number, region, timeframe of failure). Could you please send this info over an email at nautiya[at]amazon[.]com or open a ticket with AWS Support and share the ticket ID with me? |
The issue is happening when updating a service using CloudFormation (CFN). The reference to TargetGroup is not removed. I'm reopening the issue to track the related CFN improvements in one place. |
For customers using the CDK to manage ECS services, you can override the default behavior which sets an empty LoadBalancers field to undefined. From a cloudformation template: declare const yourServiceResourceName string;
const template = new cdk.cloudformation_include.CfnInclude(scope, 'Template', {
templateFile: 'path/to/template.yml',
});
const svc = this.template.getResource(yourServiceResourceName) as ecs.CfnService;
svc.loadBalancers = []; Or from an existing CDK construct: declare const stack: cdk.IStack;
declare const cluster: ecs.ICluster;
declare const taskDefinition: ecs.IFargateTaskDefinition;
const svc = new ecs.FargateService(stack, 'FargateService', {
cluster,
taskDefinition,
});
(svc.node.defaultChild as ecs.CfnService).loadBalancers = []; |
This becomes an issue with ECS, load balancers, and Code Deployment Groups. |
Any update on this? 2020 since this issue was open. |
Community Note
Tell us about your request
After an ECS Service is created there is no option to update/modify the ALB TargetGroups that are integrated with the service. In case there is a need to change the alb, running ECS Services need also to be replaced.
Which service(s) is this request for?
ECS (Both over ASG or Fargate)
Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?
We would like to have the ability to change the ALB and the TargetGroups that are integrated with an ECS Service that is already created previously.
Are you currently working around this issue?
Currently, when we introduce a new ALB (and new TargetGroups for that ALB) we provision new ECS Services from scratch.
Additional context
Anything else we should know? - No, nothing else.
Attachments
-NONE-
The text was updated successfully, but these errors were encountered: