We have two applications that require a long time(between 20 minutes and 7 days) to finish processing their data and deprovision properly. We still want to manage them in Autoscaling groups with Cloudformation.
The problem is that if we want to scale down the cluster, we need to be able to tell autoscaling to terminate a specific instance and reduce the size of the cluster by one. This is possible outside of Cloudformation, but that would interfere with the ability to update the autoscaling group with Cloudformation.
It would be nice to use Austoscaling Lifecyle Hooks, but they have a 48 hour maximum wait.
What other options are there?
I discovered that Cloudformation does not complain about changes to the number of desired instances in an ASG. I successfully reduced the size of an ASG and then updated the template that created it initially.