amazon web services - Do I need to cache the IAM role credentials when using the AWS Node.JS SDK -


we're using role based iam credentials in our aws vpc. means never pass in keys client of aws sdk.

previously we've used php sdk. amazon recommends cache credentials when using role based authentication php sdk:

https://docs.aws.amazon.com/aws-sdk-php/guide/latest/credentials.html#caching-iam-role-credentials

i'm writing node.js application using s3 client. i'm wondering if need cache credentials (as per php sdk) or node.js sdk automatically us?

the docs node.js sdk not mention caching role based credentials:

http://docs.aws.amazon.com/awsjavascriptsdk/guide/node-configuring.html#credentials_from_iam_roles_for_ec2_instances

thanks

no, not need cache iam role credentials when using aws node.js sdk.

i believe recommendation cache credentials when using php related request/cgi model php uses. without caching, per-request php process have call out ec2 instance metadata service retrieve credentials. not ideal if you're handling high load.

with node.js, have node process running , can persist credentials need call out ec2 instance metadata service once retrieve initial credentials , periodically renew credentials when auto-rotated (every few hours, believe).


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -