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.
aws-deployer
Advanced tools
Handles automated deployment to all servers in an AWS autoscaling group.
Should be considered very beta at the moment.
Provides a method to easily deploy/update code from a git repo to all servers within an AWS Autoscaling group. Similar to how AWS CodeDeploy works without the requirement of the CodeDeploy agent on the actual server.
In order to have things working properly a few different setup items need to be handled. The primary reason for this is to ensure the AWS resources are properly setup for secure access.
[my-profile]
aws_access_key_id = key
aws_secret_access_key = secret
var Deploy = require('aws-deployer')(config);
var opts = {
"parallel_groups": "availability_zone",
"auto_scaling_groups": "My-ASG",
"command" : "sudo su; pwd;"
};
Deploy.run(opts, function (err, groups) {
console.log(arguments);
});
{
aws : 'The standard configuration options for the aws-sdk. This is not required',
pem : 'String value of the AWS pem that is required to connect to the servers. This is not required',
aws_profile : 'name of the profile to use.'
}
NOTE: The AWS IAM User will need to have EC2ReadOnly access.
##Public Functions
Runs a deployment.
Parameters:
##Events Emitted
Deployer will emit some helpful events:
When the instance has been fully setup and ready for use.
Deploy.on("ready", function(config){ });
When the instance has been fully setup and ready for use.
Deploy.on("start-deploy", function(data){ });
When the deployment has been started for a specific group.
Deploy.on("start-deploy-to-group", function(data){ });
When the deployment has been completed for a specific group.
Deploy.on("complete-deploy-to-group", function(data){ });
When the deployment process has fully completed.
Deploy.on("end-deploy", function(data){ });
When the instance has been fully setup and ready for use.
Deploy.on("start-deploy-to-instance", function(data){ });
When the instance has been fully setup and ready for use.
Deploy.on("command-complete", function(data){ });
When the deployment has been completed on a specific instance.
Deploy.on("complete-deploy-to-instance", function(data){ });
If an error is thrown.
Deploy.on("error", function(error){ });
var config = {
aws_profile : 'my-profile'
};
var Deploy = require('aws-deployer')(config);
var opts = {
"parallel_groups": "availability_zone",
"auto_scaling_groups": "My-AutoScaling-Group-Name",
"command" : "sudo su;cd /data/application;git reset --hard;git pull;npm install;pm2 reload all;pm2 jlist;"
};
Deploy.run(opts, function (err, ASGroups) {
console.log(arguments);
});
Deploy.on("ready", function(data){
console.dir("..-->ready---->", data)
});
Deploy.on("start-deploy", function(data){
console.log(".....Start Deploy---->", data)
});
Deploy.on("start-deploy-to-group", function(data){
console.log("..........start-deploy-to-group---->", data)
});
Deploy.on("complete-deploy-to-group", function(data){
console.log("...............complete-deploy-to-group---->", data)
});
Deploy.on("end-deploy", function(data){
console.log("end-deploy---->", data)
});
Deploy.on("start-deploy-to-instance", function(data){
console.log("..............start-deploy-to-instance---->", data)
});
Deploy.on("command-complete", function(data){
if(data.command === 'pm2 jlist'){
var response_parts = data.response.split('\n');
var json = JSON.parse(response_parts[1]);
var revision = json[0].pm2_env.versioning.revision
console.log('..............command-complete---->",', revision);
}
//console.log("............command-complete---->", data)
});
Deploy.on("complete-deploy-to-instance", function(data){
console.log("-complete-deploy-to-instance---->", data)
});
Deploy.on("error", function(err){
console.log("-ERROR---->", err)
});
FAQs
Handles automated deployment to all servers in an AWS autoscaling group.
The npm package aws-deployer receives a total of 2 weekly downloads. As such, aws-deployer popularity was classified as not popular.
We found that aws-deployer 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
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.