title: Use appropriate ECS credentials on CodeBuild maven job
body: <p>I am trying to use the CodeBuild service role in my mvn command, but it does not seem to be picking up the appropriate IAM permissions. I am using <a href="https://github.com/s3-wagon-private/s3-wagon-private" rel="nofollow noreferrer">s3-wagon-private plugin</a> which does appear to use a recent version of <code>DefaultAWSCredentialsProviderChain</code> that includes <code>EC2ContainerCredentialsProviderWrapper</code>, so I thought it should use the CodeBuild role on the CodeBuild container. That role has the appropriate permissions to the S3 repo I am trying to access with the s3-wagon-private.</p>
  
  <p>But it appears that without using a Clojure project and a project.cloj, then it will not use the <code>DefaultAWSCredentialsProviderChain</code> by default. I have looked at <a href="https://github.com/spring-projects/aws-maven" rel="nofollow noreferrer">Spring AWS Maven</a> and <a href="https://github.com/jcaddel/maven-s3-wagon" rel="nofollow noreferrer">Maven S3 Wagon</a> but both are using a version of the <code>DefaultAWSCredentialsProviderChain</code> prior to the addition of the ECS credentials (AWS SDK ~1.11.14) and haven't seen much update to them so not overly confident we could get the SDK version updated/tested/released.</p>
  
  <p>Does anyone know of a simple means for using S3 as maven repo with a recent version of the <code>DefaultCredentialProviderChain</code>?</p>