title: How can I configure spring app to use IAM Role(running inside AWS ECS) on aws and credentials on dev env?
body: <p>How to configure spring boot app to use IAM Role? Is this code below enough? Or I'm totally wrong?</p>
  
  <pre><code>@Bean
  public AmazonS3 amazonS3Client() {
  
      return AmazonS3ClientBuilder.standard()
              .withCredentials(new AWSCredentialsProviderChain(InstanceProfileCredentialsProvider.getInstance(), new ProfileCredentialsProvider()))
              .build();
  }
  </code></pre>