Codepipeline: Insufficient permissions Unable to access the artifact with Amazon S3 object key : <p>Hello I created a codepipeline project with the following configuration:</p>

<ul>
<li>Source Code in S3 pulled from Bitbucket.</li>
<li>Build with CodeBuild, generating an docker image and storing it into a Amazon ECS repository.</li>
<li>Deployment provider Amazon ECS.</li>
</ul>

<p>All the process works ok until when it tries to deploy, for some reason I am getting the following error during deployment:</p>

<blockquote>
  <p>Insufficient permissions Unable to access the artifact with Amazon S3
  object key 'FailedScanSubscriber/MyAppBuild/Wmu5kFy' located in the
  Amazon S3 artifact bucket 'codepipeline-us-west-2-913731893217'. The
  provided role does not have sufficient permissions.</p>
</blockquote>

<p>During the building phase, it is even able to create a new docker image in the ECS repository. </p>

<p>I tried everything, changed IAM roles and policies, add full access to S3, I have even setted the S3 bucket as public, nothing worked. I am without options, if someone could help me that would be wonderful, I have poor experience with AWS, so any help is appreciated. </p>
