This Serverless plugin provides a fast iterate -> test loop in your CLI.
Logs delivered from CloudWatch to your terminal.
Deployments skip CloudFormation, and use direct updateFunction
and updateFunctionConfiguration
API calls which take only a few seconds.
Supports all runtimes
serverless plugin install -n serverless-run-watch
then run
serverless run-watch --function <yourFunctionName>
Specify the name of the function to deploy and tail logs.
Skip streaming logs, only redeploy your function when a change is detected
This is shared with serverless
, and honors a config file named something other than serverless.yml
.
This is shared with serverless
This is shared with serverless
Customize the path or paths (comma-separated) to watch. Supports glob/regex, or a direct file. Useful if you have a large project but only want to redeploy if one (or a few) files change. Also useful if my regex is missing a file you use.
sls run-watch --function <your function name>
This plugin grew from a hacky script which combines two commands built into the framework: serverless logs
and serverless deploy function
, along with chokidar
, a library based on fs
events.
It is useful only when changing function code, or function configuration changes like architecture, timeout, memory, or environment variables. Other changes (adding new functions, adding IAM permissions, new events, or provisioning additional resources) requires a full CloudFormation deployment.
Initially tested with v3. Likely supports other versions, but the CLI might not look as nice.
MIT
Feel free to raise a PR