@20i/aws-profile-scripts

0.1.1 • Public • Published

aws-profile-scripts

Installation

npm i --location=global @20i/aws-profile-scripts

Usage

Scenario 1: MFA device

# view usage entry
npx aws-mfa -h

This command helps you to authenticate with AWS using MFA and store the temporary credentials in your AWS profile.

  1. Run npx aws-mfa -p myproject
  2. Enter your six-digit code when asked for your authenticator token.

You may be asked to configure your myproject-mfa profile. It should be configured to use the access key and secret from your IAM user in AWS.

Scenario 2: SSO credentails

If you're logging in with SSO, rather than an access token, this script just adds a fast way to update your profile, but it still requires copying and pasting the SSO credential information.

# view usage entry
npx add-aws-profile --help

Instructions:

  • Open your SSO link, such as: https://twentyideas.awsapps.com/start/
  • Click on the project you want to authenticate with
  • Select "Command line or programmatic access"
  • Copy the text under "Option 2: Add a profile to your AWS credentials file"
  • Run add-aws-profile <profileName> with <profileName> as the profile you want to add or replace
  • Paste in the profile you copied

This will add the profile to your ~/.aws/credentials file, and create a backup of the file.

Readme

Keywords

none

Package Sidebar

Install

npm i @20i/aws-profile-scripts

Weekly Downloads

7

Version

0.1.1

License

ISC

Unpacked Size

98.4 MB

Total Files

6

Last publish

Collaborators

  • wilblack
  • trevordilley
  • wasredacted
  • james-20i
  • 20i-npm-service
  • valery20i
  • hiddn
  • keeto-20i
  • gelfer
  • tony20i
  • mearl20i
  • mook-20i
  • orianna-20i