AWS ECS Error when running task: No Container Instances were found in your cluster
<p>Im trying to deploy a <code>docker</code> container image to <code>AWS</code> using <code>ECS</code>, but the EC2 instance is not being created. I have scoured the internet looking for an explanation as to why I'm receiving the following error: </p>

<blockquote>
  <p>"A client error (InvalidParameterException) occurred when calling the RunTask operation: No Container Instances were found in your cluster."</p>
</blockquote>

<p><strong>Here are my steps:</strong> </p>

<p>1. Pushed a docker image FROM Ubuntu to my Amazon ECS repo.</p>

<p>2. Registered an ECS Task Definition:</p>

<pre><code>aws ecs register-task-definition --cli-input-json file://path/to/my-task.json 
</code></pre>

<p>3. Ran the task: </p>

<pre><code>aws ecs run-task --task-definition my-task
</code></pre>

<p>Yet, it fails.</p>

<p><strong>Here is my task:</strong></p>

<pre><code>{
  "family": "my-task",
  "containerDefinitions": [
    {
        "environment": [],
        "name": "my-container",
        "image": "my-namespace/my-image",
        "cpu": 10,
        "memory": 500,
        "portMappings": [
            {
                "containerPort": 8080,
                "hostPort": 80
            }
        ],
        "entryPoint": [
            "java",
            "-jar",
            "my-jar.jar"
        ],
        "essential": true
    }
  ]
}
</code></pre>

<p>I have also tried using the management console to configure a cluster and services, yet I get the same error. 
How do I configure the cluster to have ec2 instances, and what kind of container instances do I need to use? <em>I thought this whole process was to create the EC2 instances to begin with!!</em></p>