The AWS Fargate has a simple but scuttle info missing , this is what has lead you to your issue .Let me explain step by step.
First step is to create a Task definition , when you do that you can define
Entry point ["/bin/ls"]
Command [">","/list.txt","|","echo","/list.txt"]
This is equivalient to /bin/ls > /list.txt | echo /list.txt .
Please note the spaces in between has to be replaced by comma. What AWS Farget team forgot was that in the TaskDefinition > Add Container section in the wizard , this comma delimiter echo,helloworld is provided in the text box [![enter image description here][1]][1]. But in the Task form there is not such info . This is very confusing.
One last thing , AWS Fargate has very limited info for debugging. Here are my tips
- You can get only possible error under
Cluster>Task>{TaskName}>{container} . Under reason for error.
- If the error is very small , I always got Error Code0 , no space between Code0. Nothing on Cloud watch as well .
- If the error text is big (may be around 20 char or > ) you will get it both in the #1 and the CloudWatch log.
Hope it helps