Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

awsass

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

awsass - npm Package Compare versions

Comparing version 0.0.7 to 0.0.8

4

awsass.js

@@ -13,2 +13,3 @@ const { program } = require("commander");

.option("--edge-lambda-kill-warm-instances", "kill warm edge lambda instances by doing a silent redeployment")
.option("--lambda-kill-warm-instances", "kill warm lambda instances by doing a silent redeployment")
.option("--task-definition <task-definition>", "ecs task definition")

@@ -51,6 +52,7 @@ .option("--container-name <container-name>", "container name")

if (options["lambdaKillWarmInstances"])
Lib.lambdaKillWarmInstances(options["lambdaFunction"], resultFunc);
// TODO: lambda version based routing deploy
// TODO: run temporarily on fargate
// TODO: lambda flush cache normal lambda
// TODO: run task on aws/fargate
{
"name": "awsass",
"description": "AWSASS is an assistant to AWS, mostly for running better scripts.",
"version": "0.0.7",
"version": "0.0.8",
"author": "Jsonize",

@@ -6,0 +6,0 @@ "repository": "https://github.com/jsonize/awsass",

@@ -141,2 +141,29 @@ const AWS = require("aws-sdk");

});
},
lambdaKillWarmInstances: function (lambdaFunction, callback) {
const lambda = new AWS.Lambda({apiVersion: '2015-03-31'});
lambda.getFunctionConfiguration({
FunctionName: lambdaFunction,
}, function (err, functionConfiguration) {
if (err) {
callback(err);
return;
}
functionConfiguration.Environment.Variables.AWSASS = "" + (new Date()).getTime();
lambda.updateFunctionConfiguration({
FunctionName: lambdaFunction,
Environment: functionConfiguration.Environment
}, function (err) {
if (err) {
callback(err);
return;
}
setTimeout(function () {
lambda.publishVersion({
FunctionName: lambdaFunction
}, callback);
}, 5000);
});
});
}

@@ -143,0 +170,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc