I'm setting up new services in ECS and have updated my task definition many times. When I do so, I need to edit the correspondent service and update the version to the latest.
Is there a way to automatically update an AWS service with the latest version of its correspondent task definition when it's updated?
I think you have a couple of options here. The first one is, depending on how you update the task def (manually? through a pipeline?) you could queue the
force-new-deployment
call for the service after the task update call.If this is not possible (for reasons) and yet you need to automate this, you probably need to look at leveraging Event Bridge where you'd create a rule to intercept the update task definition api call you are making which would then invoke a Lambda that does the "force new deployment" on your behalf.