0
votes

I've got an existing FargateCluster with a running service and a running task definition created by the great aws-cdk.

I wonder what is the best way to deploy a new docker image to this existing Fargate-Service within a seperate AWS CDK routine/script/class? The docker image gets a new version (not latest) and I like to keep all the parameters configured in the existing task-definition and just deploy the new docker image. What I like to do in detail is geting the existing task-definition and just change the name of the image and let Fargate deploy it.

Is there any working example for this?

Any help will be appreciated.....

Regards

Christian

1

1 Answers

1
votes

I would suggest exploring using Codepipeline to deploy your app in this case. There's a very specific codepipeline action to Deploy ECS Fargate images.

If you want to start writing your own pipeline, check the standard Codepipeline package or try the cdk specific Pipelines package.

Other option would be to rerun your existent deployment and let CloudFormation deal with the changes.