Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

awsx

Package Overview
Dependencies
Maintainers
25
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

awsx

AWS CLI profile switcher with MFA support

  • 1.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
10
decreased by-72.22%
Maintainers
25
Weekly downloads
 
Created
Source

awsx

Build status codecov TypeScript 3.7.5

AWS CLI profile switcher with MFA support

Usage

Installation

// npm
npm install -g awsx

// yarn
yarn global add awsx

Add the following to your .bash_profile or .bashrc:

alias awsx="source _awsx"

Reload your profile by launching a new shell or running source ~/.bash_profile.

Upgrading

// npm
npm install -g awsx

// yarn
yarn global upgrade awsx --latest

Switching profiles

awsx or awsx [profile] or awsx [profile] [assume-role-profile]

If you don't specify a profile name (or an assume role profile name, if applicable) you will be prompted to choose from one of your existing profiles. If the selected profile has MFA enabled and you want to force a new MFA login use the --force-mfa flag.

Adding a new profile

awsx add-profile [profile] [access-key] [secret-key] [default-region] [output-format] [mfa-arn] [mfa-expiry]

NOTE: If you don't provide inputs you will be prompted for them.

Finding your MFA ARN

You can find your MFA ARN by logging into the AWS Console, clicking on your name in the menu and then clicking on "My Security Credentials". Under the "Multi-factor authentication (MFA)" section there should be an "Assigned MFA device" heading. The string below that that starts with arn:aws:iam:: is your MFA ARN.

If you don't have MFA set up on your AWS account you can enable it by following these instructions.

Adding MFA support to an existing profile

awsx enable-mfa [profile]

Removing MFA support from an existing profile

awsx disable-mfa [profile]

Removing a profile

awsx remove-profile [profile]

Adding an assume role profile

awsx add-assume-role-profile [profile] [parent-profile] [role-arn] [default-region] [output-format]

Removing an assume role profile

awsx remove-assume-role-profile [profile]

Contributing

If you'd like to contribute to awsx we recommend that you first open an issue to discuss your proposed change.

  1. Fork this repo
  2. Clone the forked repo
  3. Install dependencies: yarn

Development

yarn start

Building

yarn build

To clean the build directory run yarn clean

Testing

yarn test

Publishing

  1. Update the version in package.json
  2. Add a CHANGELOG entry
  3. Commit your changes
  4. Run npm pack --dry-run to see what will be published
  5. Run npm publish
  6. Create a release on GitHub. Use the version as the tag and release name. For example for version 1.0.0 the tag and release name would be v1.0.0.

Credits

This project was inspired by awsp

FAQs

Package last updated on 02 Apr 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc