# @20i/aws-profile-scripts

> DEPRECATED: use the native AWS CLI sign-in flow (`aws configure sso` + `aws login`/`aws logout`) instead. Both aws-mfa and add-aws-profile now only print deprecation notices.

Latest version **0.2.0** (published 2026-06-18) · ISC license · 0 weekly downloads

## Install

```sh
npm install @20i/aws-profile-scripts
pnpm add @20i/aws-profile-scripts
yarn add @20i/aws-profile-scripts
bun add @20i/aws-profile-scripts
```

Provides the commands `aws-mfa`, `add-aws-profile`.

## Health

**Score 45/100 (D)** — status: active.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; large bundle; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2026-06-18 |
| First published | 2022-10-18 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 93.5 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | @hiddenist |
| Maintainers | wilblack, trevordilley, wasredacted, james-20i, 20i-npm-service, hiddn, keeto-20i, gelfer, tony20i, mook-20i, orianna-20i |

## Links

- npm: https://www.npmjs.com/package/@20i/aws-profile-scripts
- npm.io page: https://npm.io/package/@20i/aws-profile-scripts

## Recent versions

- 0.2.0 (latest) — 2026-06-18
- 0.1.1 — 2024-05-09
- 0.1.0 — 2024-04-06
- 0.0.5 — 2023-09-06
- 0.0.4 — 2023-07-31
- 0.0.3 — 2023-04-04
- 0.0.2 — 2023-04-04
- 0.0.1 — 2022-10-18

## README

# aws-profile-scripts

> ⚠️ **This package is deprecated.** Both commands it provided — `aws-mfa` and
> `add-aws-profile` — have been superseded by the native AWS CLI sign-in flow
> (`aws configure sso` → `aws login` / `aws logout`), which auto-refreshes
> temporary credentials and removes the need for long-lived or pasted secrets.
> The commands now print deprecation notices instead of performing their old
> behavior. See the per-command sections below, and the AWS docs:
> https://docs.aws.amazon.com/signin/latest/userguide/command-line-sign-in.html

## Installation

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

## Usage

### Scenario 1: MFA device — `aws-mfa` is DEPRECATED

> ⚠️ **`aws-mfa` is deprecated.** It previously fetched temporary STS
> session-token credentials using your MFA device and stored them in an AWS
> profile. The modern AWS CLI now provides a built-in browser sign-in flow
> (`aws login` / `aws logout`) that removes the need for this script — and for
> long-lived IAM access keys.
>
> Running `aws-mfa` no longer performs the old MFA flow. It now prints a
> deprecation notice that detects your AWS CLI version and tells you how to
> switch.

**Recommended workflow:**

1. Make sure you have a recent AWS CLI installed (run `aws --version`). If
   `aws login` is unavailable, install or upgrade the AWS CLI per the docs:
   https://docs.aws.amazon.com/signin/latest/userguide/command-line-sign-in.html
2. Sign in with `aws login` and sign out with `aws logout`.
3. Because the new flow does not need permanent IAM access keys, remove your
   now-unused long-lived credentials:
   - Delete your IAM user's access keys in the AWS console (IAM → Users → your
     user → Security credentials → Access keys), or via
     `aws iam delete-access-key --access-key-id <KEY_ID>`.
   - Remove the stale access keys / `*-mfa` profiles from `~/.aws/credentials`.

See the AWS docs for full details:
https://docs.aws.amazon.com/signin/latest/userguide/command-line-sign-in.html


### Scenario 2: SSO credentials — `add-aws-profile` is DEPRECATED

> ⚠️ **`add-aws-profile` is deprecated.** It was a paste helper: you copied the
> temporary credentials block from the AWS SSO start page ("Option 2: Add a
> profile to your AWS credentials file") and it pasted them into
> `~/.aws/credentials`. Because those credentials expire, you had to re-paste
> them constantly.
>
> Running `add-aws-profile` no longer performs the paste flow. It now prints a
> deprecation notice pointing you at the native AWS CLI SSO sign-in.

**Recommended workflow:**

1. Register your SSO profile **once**:
   ```shell
   aws configure sso
   ```
   (Use your SSO start URL, e.g. https://twentyideas.awsapps.com/start/, and
   pick the account/role when prompted.)
2. Sign in whenever you need credentials — this opens a browser and
   automatically refreshes temporary credentials, with no copy-paste:
   ```shell
   aws login        # or the equivalent: aws sso login
   ```
3. Remove the now-unused pasted profiles and access keys from
   `~/.aws/credentials`.

See the AWS docs for full details:
https://docs.aws.amazon.com/signin/latest/userguide/command-line-sign-in.html

---
_Source: https://npm.io/package/@20i/aws-profile-scripts · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
