title: how to make local machine to assume IAM role
body: <p><strong>What I have</strong></p>
  
  <ol>
  <li>an IAM user </li>
  <li>an IAM role with s3,sqs permissions </li>
  <li>a spring-boot rest</li>
  <li>web service utilising aws resources  service authenticating aws
  role-based ( no keys provided )</li>
  </ol>
  
  <p><strong>What I want</strong></p>
  
  <ol>
  <li>run the application locally</li>
  <li>some way to make the local machine to assume desired IAM role</li>
  </ol>
  
  <p><strong>Aws Resource initialisation</strong></p>
  
  <pre><code>AmazonS3 amazonS3Client = AmazonS3ClientBuilder.standard()
                  .withCredentials(new EC2ContainerCredentialsProviderWrapper())
                  .withRegion(Regions.DEFAULT_REGION)
                  .withForceGlobalBucketAccessEnabled(true)
                  .build();
  
  AmazonSQS amazonSQSClient = amazonSQSClient = AmazonSQSClientBuilder.standard()
                  .withCredentials(new EC2ContainerCredentialsProviderWrapper())
                  .withRegion(Region.getRegion(regions).getName())
                  .build();
  </code></pre>
  
  <p>now when I run application and make calls 
  obviously the AWS access is denied</p>
  
  <p>I dint find any tutorial , where I can make certain configs on local machine and assume the desired role on local machine.</p>