Something like cloud run on GCP uses an API that allows for deleting services. I imagine AWS is the same. So you could have a flow that takes the unique identifier for your running container as a parameter, makes a request to that endpoint to delete the service and reports back the status.
You’d probably need another flow to create the service when you want to run it again.