I'm working on a AWS CloudFormation management platform which allows users to launch, update and delete stacks on CloudFormation.
When a stack is launched, I create a DB entry to associate it with a Template (collection of resources to be created) and a Customer. Users are able to call and view the latest events happening to their stack i.e. "CREATION_IN_PROGRESS", "CREATION_COMPLETED".
Currently when a stack is deleted, I delete it from the DB immediately, providing no further information to the user aside from "Your stack is being deleted".
The callback that is currently available when executing a deleteStack()
is already returned once the stack deletion is initiated.
I would like to provide more information and events whilst it is being deleted and when the stack is completely deleted, delete it from my DB.
The only way to make this happen is executing a function to check the stacks' existence on a timed interval and once it is gone, delete it from the database.
Am I wrong to assume this, or does anyone reading this have a better idea or implementation?
Any information is welcome.