Socket
Socket
Sign inDemoInstall

@20i/aws-profile-scripts

Package Overview
Dependencies
Maintainers
16
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@20i/aws-profile-scripts

Command line scripts for managing your AWS profile


Version published
Weekly downloads
3
decreased by-62.5%
Maintainers
16
Weekly downloads
 
Created
Source

aws-profile-scripts

Usage

# install globally - this is a private @20i package so make sure your .npmrc is set up
npm i -g @20i/aws-profile-scripts

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

Scenario 1: SSO credentails

  • 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.

Scenario 2: MFA device

  • Configure an mfa profile. This will contain an access key generated in IAM.
    # I'm creating a profile called my-project, so I need to add my-project-mfa
    aws configure --profile my-project-mfa
    
  • Run npx aws-mfa -p my-project
    • Get the serial number for your MFA device from the AWS console. It should look something like this: arn:aws:iam::123456789123:mfa/Authenticator. You can also pass a -s flag to the aws-mfa command to keep this handy in your terminal history.
    • Enter the token from your authenticator when prompted for your OTP.

This should add a profile to your ~/.aws/credentials file with a temporary token. This command does not currently create a backup file for you, so you may want to make one yourself before running it.

FAQs

Package last updated on 06 Sep 2023

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