Skip to content

This helps you deal with IAM Roles easily and have a continued credentialed session without resorting to custom code.

Notifications You must be signed in to change notification settings

AchintyaAshok/AWS-IAMRole-Helper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AWS IAM Role Helper

This project builds off of the AWS SDK and makes it easier for you to instantiate IAM Role Sessions for your SDK Needs. Once you have instantiated your role session using a simple command, you can go ahead and use the SDK to query for your resources.

Instantiate Your Role Session:

const AWS = require('AWS-sdk') // Your top-level import of AWS-sdk
const AWSRoleHelper = require('aws-iamrole-helper')
AWSRoleHelper.assumeRole(AWS, your_role_ARN)
  .then(() => {
    // do your work here to query the SDK
  })

Assume multiple roles at the same time. AWSRoleHelper takes care of managing all the sessions behind the scenes.

const roleARNblue = 'Role ARN for some resource set blue'
const roleARNred = 'Role ARN for some resource set red'

AWSRoleHelper.assumeRole(AWS, roleARNBlue)
  .then(() => {
    // do something with BLUE resources
  })

AWSRoleHelper.assumeRole(AWS, roleARNRed)
  .then(() => {
    // do something with RED resources
  })

About

This helps you deal with IAM Roles easily and have a continued credentialed session without resorting to custom code.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published