Security News
Opengrep Emerges as Open Source Alternative Amid Semgrep Licensing Controversy
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
hapiest-lambda-deploy
Advanced tools
Package that makes deploying AWS Lambda Functions simple and easy
Hapiest-lambda-deploy is designed to make it super-simple to deploy one or more lambda functions in a repository.
Create a deploy config folder with the following files:
i. deployConfig.json (see example below)
{
"lambdaFunctions": [{
"functionName": "hapiestLambdaDeployTest",
"zipContents": [
"index.js",
"lib"
],
"environments": [
{
"envName": "env1",
"nodeEnvValue": "environment1",
"liveAliasName": "LIVE"
}, {
"envName": "env2",
"nodeEnvValue": "environment2",
"liveAliasName": "LIVE"
}
]
}]
}
ii. deployCredentials.json (see example below)
{
"awsCredentials": {
"accessKeyId": "someIAMAccessKeyId",
"secretAccessKey": "someIAMSecretAccessKey",
"region": "us-east-1"
}
}
Create a "bin" .js file similar to the one below
const Promise = require('bluebird');
const Path = require('path');
const NodeConfig = require('config');
const serviceLocator = require('../../services/serviceLocatorFactory').getServiceLocatorSingleton(NodeConfig);
const logger = serviceLocator.getLogger();
/** @type {DeployLambdaServiceFactoryFolders} */
const folders = {
config: Path.resolve(__dirname, '../config'),
projectRoot: Path.resolve(__dirname, '../..')
};
const DeployServiceFactory = require('hapiest-lambda-deploy');
const deployService = DeployServiceFactory.create(folders, logger);
deployService.deployFromCommandLineArguments(process.argv)
.then(() => process.exit())
.catch(err => logger.error('Deploy failed', err));
Update package.json to make it easy to deploy using "npm run ..."
{
"scripts": {
"git:ensureClean": "test -z \"$(git status --porcelain)\" || (echo \"Dirty working directory - aborting\" && test -n \"\")",
"deploy:env1": "npm run git:ensureClean && node deploy/bin/deploy.js -f hapiestLambdaDeployTest -e env1 -c $(git rev-parse HEAD)"
}
}
Note, you want to ensure that you have a clean directory so that you don't accidentally deploy code that hasn't been tested / check in. You can optionally remove git:ensureClean step if you like playing Russian Roulette.
Deploy the Lambda function by running
npm run deploy:env1
Currently there's only a single integration test. I plan to add unit tests at some later point in time. To get the integration test up and running, you should:
Create test/helper/integration/config/deployCredentials.json file with valid credentials from Setup step 1
Create an AWS Lambda function with the name hapiestLambdaDeployTest_env1
and a corresponding alias named LIVE
Check that the test runs using npm run test:integration
FAQs
Package that makes deploying AWS Lambda Functions simple and easy
The npm package hapiest-lambda-deploy receives a total of 2 weekly downloads. As such, hapiest-lambda-deploy popularity was classified as not popular.
We found that hapiest-lambda-deploy 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
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.