
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
aws-command-stack
Advanced tools
This module helps in running complex series of dependent AWS API methods. There's not really any AWS specific logic here, it simply wraps the client objects provided by the AWS SDK and exposes an async stack interface for pushing named commands onto the stack, these can optionally include a callback that can in turn push more commands. Originally developed to support the specific use case of creating/viewing/destroying VPCs and their dependents (Internet Gateways, Subnets, NAT instances, etc.), see [list-clouds.js] for a related example.
npm install aws-command-stack
Find and release all of the unallocated VPC Elastic IP addresses in a region.
var AWSCommandStack = require("aws-command-stack");
// configure clients (can be avoided with IAM Roles for EC2 Instances)
var config = {
region: 'us-east-1',
accessKeyId: 'AKyourAccessKeyId',
secretAccessKey: 'yourSecretAccessKey'
};
// create the stack, first argument is a list of which API clients to initialize
var aws = new AWSCommandStack(['EC2'], config);
aws.on("error", function (error) { console.error(error); process.exit(1); });
// push our first command, with a custom call back
aws.push("EC2.describeAddresses", { Filters: [ { Name: "domain", Values: [ "vpc" ] } ] }, function (data) {
var Addresses = data.Addresses.filter(function (Address) { return !Address.InstanceId; });
Addresses.forEach(function (Address) {
// push our followup commands, these use the default callback
aws.push("EC2.releaseAddress", { AllocationId: Address.AllocationId });
});
aws.next(); // tells stack to go on to the next command, or exit if all done
});
// push our first command
aws.run();
You can use the included sample list-clouds.js to view a hierarchal list of all VPCs in a region (including subnets and instances):
% node list-clouds.js us-west-2
us-west-2: found 1 Vpcs
vpc-71cbe109 10.0.0.0/16 []
subnet-79cbe110 10.0.1.0/24
subnet-7adbe112 10.0.0.0/24
i-ea57cefd 10.0.0.162 54.213.18.102 []
MIT
FAQs
execute flexible series of dependent AWS api calls
The npm package aws-command-stack receives a total of 0 weekly downloads. As such, aws-command-stack popularity was classified as not popular.
We found that aws-command-stack 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.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.