osls (also invokable as serverless or sls) is the command-line interface for building, deploying, and operating your serverless services on AWS. This page indexes every command, grouped by purpose, with a short description and a link to its full reference. See Common Options below for the global flags that apply across most commands.
Run any command with --help (or -h) to print its usage and options, and osls --help for the top-level command list.
Commands that build, ship, roll back, and tear down your service.
package— Package your service into deployment artifacts without deploying.deploy— Deploy your entire service to AWS via CloudFormation.deploy function— Quickly deploy a single function's code or configuration without a full stack update.rollback— Roll the service back to a previous deployment.rollback function— Roll a single function back to a previous version.remove— Remove the deployed service and all of its AWS resources.
Commands that show information about a deployed service, invoke functions, and read configuration.
info— Display information about the deployed service (endpoints, functions, resources).invoke— Invoke a deployed function and view its result.invoke local— Invoke a function locally on your machine for fast iteration.logs— Output (and optionally tail) the CloudWatch logs of a deployed function.metrics— Show CloudWatch metrics for the service or a specific function.print— Print your compiled and variable-resolved configuration.deploy list— List existing deployments of your service;deploy list functionslists deployed functions and their versions.
Commands that create new services and generate sample data.
create— Create a new service from a template (local, built-in, or remote URL).install— Install a service from a remote Git URL into a new directory.generate-event— Generate a sample event payload for local testing (e.g.aws:apiGateway,aws:sns,aws:sqs).
Commands for discovering and managing plugins. (plugin is a namespace; always run it with one of the subcommands below.)
plugin list— List all available plugins.plugin search— Search for plugins by query.plugin install— Install a plugin and add it to your service.plugin uninstall— Uninstall a plugin and remove it from your service.
Commands for provider credentials and diagnostics.
config credentials— Configure a provider profile (e.g. AWS access key and secret) forosls.doctor— Print the status of any deprecations triggered during the last command run. (Runosls doctor.)
The following options are available across commands. Their availability depends on the command type: global options work everywhere, service options apply to commands that load serverless.yml, and AWS options apply to commands that talk to AWS.
| Option | Shortcut | Scope | Description |
|---|---|---|---|
--config |
-c |
Service commands | Path to the serverless configuration file, if other than serverless.yml|.yaml|.js|.json. |
--stage |
-s |
Service commands | Stage of the service to target (e.g. dev, prod). |
--param |
(none) | Service commands | Pass custom parameter values for the param variable source. Usage: --param="key=value"; repeatable. |
--region |
-r |
AWS commands | AWS region of the service. |
--aws-profile |
(none) | AWS commands | AWS credentials profile to use for the command. |
--verbose |
(none) | Global | Show verbose logs. |
--debug |
(none) | Global | Namespace of debug logs to expose (use "*" to display all). |
--help |
-h |
Global | Show help for the command (or general help when run alone). |
--version |
-v |
Global | Show version info. |
Notes:
- Boolean flags can be negated where supported (e.g.
--no-aws-s3-accelerateondeploy). - Service-scoped options (
--config,--stage,--param) and AWS-scoped options (--region,--aws-profile) are only meaningful for commands that operate on a service or against AWS; the global options apply to every command. - Each command page lists its own additional options.