
Product
Announcing Bun and vlt Support in Socket
Bringing supply chain security to the next generation of JavaScript package managers
serverless-cli-v3
Advanced tools
This tool was created to optimize the creation time of client specific integrations and to define a standard in file and folder structures.
It also accelerates the exchange of knowledge with other teams in other parts of the world 🌎. This update of the tools makes goes in hand with the update of flow to Studio-NG
ysc [options] [command]
-V, --version output the version number
-h, --help output usage information
init Create a new base project for serverless (lambdas)
add-lambda Create a new base lambda scripts for the serverless (with its respective unit-test)
generate [options] Generate the following files: serveless.yml, README.md, docs.md
Usage: init [options]
Create a new base project for serverless (lambdas)
Options:
-h, --help output usage information
Usage: add-lambda [options]
Create a new base lambda scripts for the serverless (with its respective unit-test)
Options:
-h, --help output usage information
Usage: generate [options]
Generate the following files: serveless.yml, README.md, docs.md
Options:
-s --stage <stage> Serverless stage (staging or production) (default: "staging")
--no-serverless Do not generate the serverless.yml
-h, --help output usage information
In order to generate the serverless.yml file with all lambdas' settings (environment vars, secrets, networking configs, etc), it is required to place those configurations on the yalo-config.json file.
Currently it is possible to map the following features from the yalo-config.json file to the serverless.yml (the one generated by the CLI generate command):
/${project-prefix}/${stage}/${var-name}.aeromexico, femsa-mx, pepsico-ch, etc. This is mainly for identifying a group of lambda functions' performance/health on Datadog. It is suggested to put as an slugified version of the customer's name, and maybe also the country code if it's a global account.{
"aws": {
"service": "MyServerlessProjectService",
"prefix": "my-serverless-project",
"customer": "my-customer",
"region": "us-east-1",
"runtime": "nodejs10.x",
"vpc": {
"securityGroups": [
"sg-05a7c1fa7e055cc89"
],
"subnets": [
"subnet-0494f36d5918a3d0b",
"subnet-02603079c20f46758"
]
},
"envVars": {
"globals": {
"staging": {
"myGlobalVar": "myGlobalVarStagingValue"
},
"production": {
"myGlobalVar": "myGlobalVarProdValue"
}
},
"functions": {
"do-something": {
"staging": {
"myDoSomethingVar": "myDoSomethingVarStagingValue"
},
"production": {
"myDoSomethingVar": "myDoSomethingVarProdValue"
}
}
}
},
"ssmVars": {
"globals": [
"myGlobalSSMVar", "myOtherGlobalSSMVar"
],
"functions": {
"do-something": [
"myDoSomethingSSMVar"
]
}
}
}
}
The generate command will set any custom tag defined on a lambda function inside the serverless.yml file definition.
To set any custom tag, you need to add it on your lambda function metadata variable. Like the following:
...
const metadata = {
description: 'My lambda function description',
timeout: 180,
tags: [
{ key: 'datadog', value: true },
{ key: 'yalo-feature', value: 'my-feature' },
],
}
...
const handler = async (event, context, callback) => {
...
// handler code
...
}
...
module.exports = {
handler,
metadata,
schema,
}
The task of making the yalo-config.json file with all lambdas' configurations can get somewhat tedious, particularly on projects with several lambda functions.
To help you a little with this, you can get a concentrate of all your project's settings by using the backup-lambdas script. That concentrate might be handy to identify all the Serverless settings that need to be mapped to the yalo-config.json file.
FAQs
Yalo serverless CLI v3
We found that serverless-cli-v3 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.

Product
Bringing supply chain security to the next generation of JavaScript package managers

Product
A safer, faster way to eliminate vulnerabilities without updating dependencies

Product
Reachability analysis for Ruby is now in beta, helping teams identify which vulnerabilities are truly exploitable in their applications.