npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

fm-assume-role

v2.0.3

Published

This module makes a life a bit easier when working with AWS assume roles by adding an one line cli-interface to automatically allowing temporary credentials to work when doing deployment etc.

Downloads

5

Readme

FM ASSUME ROLE

This module makes a life a bit easier when working with AWS assume roles by adding an one line cli-interface to automatically allowing temporary credentials to work when doing deployment etc.

To Install (globally)

npm install -g fm-assume-role

Usage

Important : this will be using your [default] AWS profile credentials to assume the roles. So it is important to set this default credentials on you aws config file and be able to assume roles from other accounts using this credentials.

1. Using AWS profile

You can customise the ~/.aws/credentials files and add role_arn or account_number to any profile and use this tool to assume roles easily.

e.g

~/.aws/credentials

[myserver-prod]
aws_access_key_id = YOUR_ACCESS_KEY (this is optional for this tool)
aws_secret_access_key = YOUR_SECRET_KEY (this is optional for this tool)
role_arn = arn:aws:iam::123456789101:role/testing
account_number = 123456789101

then you can do,

fm-assume-role --profile="myserver-prod" --bashcommand="sls deploy --stage=prod"

or

fm-assume-role --profile="myserver-prod" --role="testing" --bashcommand="sls deploy --stage=prod"

role_arn will have priority over account_number. if you didnt specify the --role , role will be defaulted to temporary_access_to_devs

2. Specifying role_arn or accountnumber in CLI

e.g.

fm-asssume-role --role_arn="arn:aws:iam::123456789101:role/testing" --bashcommand="sls deploy --stage=prod"

fm-asssume-role --accountnumber="123456789101" --bashcommand="sls deploy --stage=prod"

Note

If you avoid the --bashcommand flag and tool will only copy the new access details onto your clipboard, then you can past it on any terminal window and get access for that bash window. all subsequent aws calls will on that bash window will use the new credentials(until the token expires)

Available Options

fm-assume-role
    --role_arn
    --sessionname
    --duration
    --verbose
    --role
    --accountnumber
    --bashcommand
    --profile
    --v || --version

If you come across with any issues, please open a issue in the github repo with the details of the issue.(including which operating system you are using)