title: how to create IAM role for a spring boot rest api web service deployed in aws ec2 instance
body: <p>I am new to AWS.</p>
  
  <p>What I have done :</p>
  
  <ol>
  <li>created a spring boot rest web service with a few rest api exposed</li>
  <li>checked out the api in aws ec2 instance</li>
  <li>execute the spring boot application </li>
  </ol>
  
  <p>I have enabled required port for communication , thus I am able to access the rest APIs from browser client .</p>
  
  <p>But my AWS services calls are using a secret-key pair for authentication when application context loads up for a given user .</p>
  
  <p>Now I am working on removing the keys based authentication for AWS servies and start using IAM-ROLE-BASED authentication so I dont have to share keys in source code or on ec-2 instance config files.</p>
  
  <p>What I understood from IAM roles , is that I have create an IAM role which will be consumed by rest apis clients for aws services authentication .</p>
  
  <p>what services should I allow in AWS IAM ROLE to be able to call my rest api service ?</p>