Issue
My biggest frustration with ECS is that its not observable.
I deploy my service, my tasks go into "pending" and I cross my fingers.
Sometimes I get useful error messages in the console, sometimes they just hang out in "pending" indefinitely. I see no events being generated and have no idea what it's trying to do, or where it is stuck.
I can restart the ECS service or other hacks I've had to do before, but at this point I'd like to see what's actually happening when a task is in "pending". Are there logs anywhere for this?
Solution
Click on that task which is in pending state. It will show you the single log status of the container and If you have attached the cloud watch logs It will show you the full logs about why it is pending?.
Check the docker container logs by SSHing to the ec2 container instance of the task you are running.
Answered By - Sunil Valmiki Answer Checked By - David Marino (WPSolving Volunteer)