
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
aws-profile-switcher
Advanced tools
A basic cli for switching your default aws profile in ~/.aws/credentials
A simple command line utility that allows you to switch your default aws profile found at ~/.aws/credentials
.
Let me know via GitHub if you notice any issues on a given OS. I'm open to any suggestions.
Install: npm install -g aws-profile-switcher
Usage: switcher <command> [options]
Commands:
list|ls Lists available AWS profiles from [~/.aws/credentials]
current|c List the current default profile
switch|sw [options] Switches the default profile to a different, user-specified profile
Global Options:
-h, --help output usage information
-V, --version output the version number
Switch Command Options:
-p, --profile <optional> The name of the profile to make the default profile
-i, --index <optional> The index of the profile to make the default profile (from list command)
*The alias for the 'current' command was 'curr' previous to v1.0.0
Given the following ~/.aws/credentials
file. (This is not a sequence of commands. Assume each is done in a separate environment on the file below)
[default]
aws_access_key_id = PROFILE_2_ID
aws_secret_access_key = PROFILE_2_SECRET
[profile1]
aws_access_key_id = PROFILE_1_ID
aws_secret_access_key = PROFILE_1_SECRET
[profile2]
aws_access_key_id = PROFILE_2_ID
aws_secret_access_key = PROFILE_2_SECRET
[profile3]
aws_access_key_id = PROFILE_3_ID
aws_secret_access_key = PROFILE_3_SECRET
Command: switcher ls
Output:
> Available profiles:
> 1: profile1
> 2: profile2
> 3: profile3
Changes to file: <none>
Command: switcher curr
Output:
> Current profile: profile2
Changes to file: <none>
Command: switcher sw
Output:
> 1: profile1
> 2: profile2
> 3: profile3
> prompt: index:
Input: 3
Output: Switching default aws profile to profile3
Changes to file:
[default]
- aws_access_key_id = PROFILE_2_ID
- aws_secret_access_key = PROFILE_2_SECRET
[default]
+ aws_access_key_id = PROFILE_3_ID
+ aws_secret_access_key = PROFILE_3_SECRET
Command: switcher sw -p profile1
Output: Switching default aws profile to profile1
Changes to file:
[default]
- aws_access_key_id = PROFILE_2_ID
- aws_secret_access_key = PROFILE_2_SECRET
[default]
+ aws_access_key_id = PROFILE_1_ID
+ aws_secret_access_key = PROFILE_1_SECRET
Command: switcher sw -i 3
Output: Switching default aws profile to profile3
Changes to file:
[default]
- aws_access_key_id = PROFILE_2_ID
- aws_secret_access_key = PROFILE_2_SECRET
[default]
+ aws_access_key_id = PROFILE_3_ID
+ aws_secret_access_key = PROFILE_3_SECRET
Yes, I'm aware of the built-in profile functionality that AWS CLI has. This little tool was written for many reasons:
--profile
as an option, so the export/set
command is the only optionswitcher sw
is less characters and easier to remember than exports/set AWS_DEFAULT_PROFILE=profile1
(although a bash alias/function could shorten the # of characters)switcher sw
lists out the profiles so that you don't have to remember the names~/.bash_profile
file correctly, most likelyFAQs
A basic cli for switching your default aws profile in ~/.aws/credentials
The npm package aws-profile-switcher receives a total of 1 weekly downloads. As such, aws-profile-switcher popularity was classified as not popular.
We found that aws-profile-switcher demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.