title: Can't access EC2 instance IAM Role Credentials from NodeJS Javascript
body: <p>I've successfully added an AWS Role to an EC2 instance. When I ssh into the instance and curl <a href="http://169.254.169.254/latest/meta-data/iam/security-credentials/" rel="nofollow noreferrer">http://169.254.169.254/latest/meta-data/iam/security-credentials/</a>, I can see the temporary credentials just fine.  </p>
  
  <p>On this EC2 instance, I have an NGINX reverse proxy serving a NodeJs web app. I want to be able to access DynamoDB in the Javascript of the web app but the AWS.config.credentials are null.</p>
  
  <p>From what I've read, shouldn't these credentials be loaded automatically since the role was applied to the EC2 instance?</p>
  
  <p>Is there some way to pass those credentials into the web app that I'm missing?</p>
  
  <p>DynamoDB is being setup like this:</p>
  
  <pre><code>private dynamoDB = new AWS.DynamoDB();
  private dynamoDBClient = new AWS.DynamoDB.DocumentClient({ service: this.dynamoDB, convertEmptyValues: true });
  </code></pre>