Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
mpaws is a Python CLI for running an AWS command across multiple profiles and multiple regions in one go.
This is a time-saver when you are managing dozens of AWS accounts and need to run the same command across all of them.
pip3 install mpaws
Set an environment variable MPAWS_PROFILES
, and another environment variable MPAWS_REGIONS
, then run mpaws
command:
export MPAWS_PROFILES=profile1,profile2,profile3
export MPAWS_REGIONS=us-east-1,ap-southeast-2
mpaws ec2 describe-instances
The above command will run aws ec2 describe-instances
command for each permutation of the AWS profiles and AWS regions, like these:
AWS_PROFILE=profile1 AWS_DEFAULT_REGION=us-east-1 AWS_REGION=us-east-1 aws ec2 describe-instances
AWS_PROFILE=profile1 AWS_DEFAULT_REGION=ap-southeast-2 AWS_REGION=ap-southeast-2 aws ec2 describe-instances
AWS_PROFILE=profile2 AWS_DEFAULT_REGION=us-east-1 AWS_REGION=us-east-1 aws ec2 describe-instances
AWS_PROFILE=profile2 AWS_DEFAULT_REGION=ap-southeast-2 AWS_REGION=ap-southeast-2 aws ec2 describe-instances
AWS_PROFILE=profile3 AWS_DEFAULT_REGION=us-east-1 AWS_REGION=us-east-1 aws ec2 describe-instances
AWS_PROFILE=profile3 AWS_DEFAULT_REGION=ap-southeast-2 AWS_REGION=ap-southeast-2 aws ec2 describe-instances
Alternatively, you can also run mpaws
with multiple AWS profiles against a single AWS region. You can do this by setting the environment variable MPAWS_PROFILES
, then run mpaws
command:
export MPAWS_PROFILES=profile1,profile2,profile3
mpaws ec2 describe-instances
The above command will run aws ec2 describe-instances
command using each AWS profile, combined with the configured AWS region (either via AWS_DEFAULT_REGION
, AWS_REGION
, or the configured region within the profile definition).
Here's an example if AWS_DEFAULT_REGION
is specified with us-east-1 as the value:
AWS_PROFILE=profile1 AWS_DEFAULT_REGION=us-east-1 AWS_REGION=us-east-1 aws ec2 describe-instances
AWS_PROFILE=profile2 AWS_DEFAULT_REGION=us-east-1 AWS_REGION=us-east-1 aws ec2 describe-instances-instances
AWS_PROFILE=profile3 AWS_DEFAULT_REGION=us-east-1 AWS_REGION=us-east-1 aws ec2 describe-instances
Note that each run will also carry over the environment variables available from the original mpaws
command run.
Ensure that the profiles specified in MPAWS_PROFILES
are already configured in credential file. And the regions specified in MPAWS_REGIONS
, AWS_DEFAULT_REGION
, AWS_REGION
, or AWS configuration are valid regions.
Environment Variable | Mandatory | Example |
---|---|---|
MPAWS_PROFILES | Yes | profile1,profile2,profile3 |
MPAWS_REGIONS | No | us-east-1,ap-southeast-2 |
AWS_DEFAULT_REGION | No | us-east-1 |
AWS_REGION | No | us-east-1 |
Build reports:
FAQs
Execute AWS CLI across multiple profiles and multiple regions in one go
We found that mpaws demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.