@20i/aws-profile-scripts
Advanced tools
Comparing version 0.0.5 to 0.1.0
{ | ||
"name": "@20i/aws-profile-scripts", | ||
"version": "0.0.5", | ||
"version": "0.1.0", | ||
"description": "Command line scripts for managing your AWS profile", | ||
@@ -5,0 +5,0 @@ "scripts": { |
# aws-profile-scripts | ||
## Usage | ||
## Installation | ||
```shell | ||
# install globally - this is a private @20i package so make sure your .npmrc is set up | ||
npm i -g @20i/aws-profile-scripts | ||
``` | ||
## Usage | ||
### Scenario 1: MFA device | ||
```shell | ||
# 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. | ||
```shell | ||
# view usage entry | ||
npx add-aws-profile --help | ||
``` | ||
### Scenario 1: SSO credentails | ||
Instructions: | ||
* Open your SSO link, such as: https://twentyideas.awsapps.com/start/ | ||
@@ -24,13 +45,1 @@ * Click on the project you want to authenticate with | ||
### 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. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
98384577
45
2