title: Access S3 from AWS EC2 from AWS SDK without Access Id and secret Key
body: <p>How can <strong>AWS-SDK</strong> that runs from <strong>AWS-EC2</strong> instance access <strong>AWS-S3</strong> bucket?</p>
  
  <ol>
  <li>The <strong>AWS-EC2</strong> policy is set such that it can access the <strong>S3
      bucket</strong> without accessId and secret key. </li>
  <li><strong>Aws-cli</strong> tool was able to access the <strong>S3 bucket</strong> from EC2 instance without the need of any <em>accessId and secret key</em>.</li>
  <li>If <strong>aws-cli</strong> tool was able to access the S3 without <em>accessId and secret</em> key, the AWS-SDK must also have a way to do it while it runs
      from EC2 instance.</li>
  </ol>
  
  <p>How can this be done?</p>