(aws-ecs): Update Fargate service with new image tag using typescript cdk code #15300
Labels
@aws-cdk/aws-ecs
Related to Amazon Elastic Container
guidance
Question that needs advice or information.
I'm trying to update my already created ECS service with a new task definition with typescript cdk But I do not find any ECS.FargateService.Update methods.
What is the best way to update my service in this case?
The reason I need to do this is:
I m trying to achieve Blue-Green deployment whenever my image tag changes in the service. Whenever I try to do a CDK deploy with a new image tag, I get:
Resource handler returned message: "Invalid request provided: UpdateService error: Unable to update task definition on services with a CODE_DEPLOY deployment controller. Use AWS CodeDeploy to trigger a new deployment. (Service: AmazonECS; Status Code: 4
After some reading, I found that CDK deploy tries to change the same task revision which won't work with the BLUE GREEN controller.
Hence I thought of manually writing my own stack to update service consisting of:
Basically, implementing whatever I do from the UI to trigger a Blue-Green Deployment.
But I am stuck in completing writing step 2 since there is not an option in the CDK code. Wondering if anyone has done this before?
Environment
The text was updated successfully, but these errors were encountered: