@20i/aws-profile-scripts
v0.2.0
Published
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.
Maintainers
Keywords
Readme
aws-profile-scripts
⚠️ This package is deprecated. Both commands it provided —
aws-mfaandadd-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
npm i --location=global @20i/aws-profile-scriptsUsage
Scenario 1: MFA device — aws-mfa is DEPRECATED
⚠️
aws-mfais 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-mfano 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:
- Make sure you have a recent AWS CLI installed (run
aws --version). Ifaws loginis unavailable, install or upgrade the AWS CLI per the docs: https://docs.aws.amazon.com/signin/latest/userguide/command-line-sign-in.html - Sign in with
aws loginand sign out withaws logout. - 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 /
*-mfaprofiles from~/.aws/credentials.
- Delete your IAM user's access keys in the AWS console (IAM → Users → your
user → Security credentials → Access keys), or via
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-profileis 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-profileno longer performs the paste flow. It now prints a deprecation notice pointing you at the native AWS CLI SSO sign-in.
Recommended workflow:
- Register your SSO profile once:
(Use your SSO start URL, e.g. https://twentyideas.awsapps.com/start/, and pick the account/role when prompted.)aws configure sso - Sign in whenever you need credentials — this opens a browser and
automatically refreshes temporary credentials, with no copy-paste:
aws login # or the equivalent: aws sso login - 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
