Reputation: 25187
I have a microservice that I would normally have used Lambda for but it occasionally takes longer than 5 mins. So I created a docker container and set it up so that every time I run it, it does it's business and then stops. It works great and I'm happy with it.
What I'm not happy with is the the ECS "Last status" for the task shows "STOPPED" in red letters and shows the "Stopped reason" as "Essential container in task exited". Is there some way to make this show "Success" in green and/or change the stopped reason to "Successful termination" or similar?
Upvotes: 1
Views: 1270
Reputation: 995
I wonder if you flipped the bit that indicates "essential" in the container definition, perhaps it wouldn't be considered an error. A "service" is a long running thing so maybe what you are really looking for is to just run a task from the aws cli, and not have it live as a service with 0 running tasks. Another option would be in the service something running as an api that on request runs the task via aws sdk.
Upvotes: 1