title: ECS Fargate task not applying role
body: <p>I have an ECS Fargate task running that has a role attached to it. This role has the S3FullAccess policy (and AssumeRole trusted partnership with ECS service).</p>
  
  <p>However when trying to put an object into a bucket, I get Access Denied errors. I have tried booting an EC2 instance and attaching the same role and can put to the bucket without issue.</p>
  
  <p>To me it seems like the role is not being attached to the task. Is there an important step I'm missing? I can't SSH into the instance as it's Fargate.</p>
  
  <p><strong>UPDATE:</strong>
  I extracted the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables that are set and used them on my local machine. I am getting the Access Denied issues there too, implying (to me) that none of the polices I have set for that role are being applied to the task.</p>
  
  <p>Anyone that can help with anything is appreciated!</p>
  
  <p><strong>WORKAROUND:</strong>
  A simple workaround is to create an IAM User with programmatic access and set the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables in your task definition.</p>
  
  <p>This works, but does not explain the underlying issue.</p>