title: Do I need to cache the IAM role credentials when using the AWS Node.JS SDK
body: <p>We're using Role Based IAM credentials in our AWS VPC. This means that you never pass in keys to the client of the AWS SDK.</p>
  
  <p>Previously we've used the PHP SDK. Amazon specifically recommends to cache the credentials when using role based authentication with the PHP SDK:</p>
  
  <p><a href="https://docs.aws.amazon.com/aws-sdk-php/guide/latest/credentials.html#caching-iam-role-credentials" rel="nofollow">https://docs.aws.amazon.com/aws-sdk-php/guide/latest/credentials.html#caching-iam-role-credentials</a></p>
  
  <p>I'm now writing a Node.JS application using the S3 client. I'm wondering if I need to cache the credentials (as per PHP SDK) or is this something that the Node.JS SDK automatically does for us?</p>
  
  <p>The docs for the Node.JS SDK do not specifically mention anything about caching role based credentials:</p>
  
  <p><a href="http://docs.aws.amazon.com/AWSJavaScriptSDK/guide/node-configuring.html#Credentials_from_IAM_Roles_for_EC2_Instances" rel="nofollow">http://docs.aws.amazon.com/AWSJavaScriptSDK/guide/node-configuring.html#Credentials_from_IAM_Roles_for_EC2_Instances</a></p>
  
  <p>Thanks</p>