How can I leave prev task definition as activate status. #5300
-
Hi. I'm using AWS Copilot Backend Service. So, I want to ask two things.
Thanks for read my discussion :) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Yup! You can use yaml patch to update the - op: add
path: /Resources/TaskDefinition/UpdateReplacePolicy
value: Retain Edit: I will add a bit explanation on why this would work. The task definition became INACTIVE because when CFN updates the stack, it under the hood By adding |
Beta Was this translation helpful? Give feedback.
Yup! You can use yaml patch to update the
TaskDefinition
'sUpdateReplacePolicy
toRetain
:Edit: I will add a bit explanation on why this would work.
The task definition became INACTIVE because when CFN updates the stack, it under the hood
CREATE
a task definition with a new revision, andDELETE
the old task definition revision. In this case, "delete" means "deregistering" the old task def, resulting in the old task def revision becoming INACTIVE.By adding
UpdateReplacePolicy: Retain
, we prevent CFN to do the "delete" step, hence keeping the old task def as ACTIVE.