title: AWS ECS Blue/Green CodePipeline: Exception while trying to read the image artifact
body: <p>I wanted to create a CodePipeline which builds a container image from CodeCommit source and afterwards deploys the new image in Blue/Green fashion to my ECS service (EC2 launchtype).</p>
  
  <ul>
  <li>The source stage is CodeCommit, which already includes appspec.json<br>
  as well as taskdef.json  </li>
  <li>The build stage is building the new
  container    &amp; pushing it to ECR successfully, the file
  imagedefinition.json is    the BuildArtifact created at this step,
  containing the container and    the recently created image with its
  tag corresponding to the    CodeCommit commit-id.  </li>
  <li>The deploy stage
  is made of action "Amazon ECS    (Blue/Green)" using the
  SourceArtifact and BuildArtifact as    InputArtifacts, to take the
  appspec and taskdef from the    SourceArtifact and the image
  description from the BuildArtifact, to    finally deploy the new
  container in Blue/Green manner.</li>
  </ul>
  
  <p>The problem is with the image definition from the BuildArtifact. The pipeline fails in the Deploy phase with error:  </p>
  
  <p>""
  Invalid action configuration
  Exception while trying to read the image artifact file from the artifact: BuildArtifact.
  ""</p>
  
  <p>How to properly configure the "Amazon ECS (Blue/Green)" deploy phase, so that it can use the recently created image and deploy it....by replacing placeholder IMAGE_NAME inside taskdef.json ?</p>
  
  <p>Any hint highly appreciated :D</p>