Every serverless command starts with serverless
or shorter sls
Serverless python hello world (source: https://serverless.com/framework/docs/providers/aws/examples/hello-world/python/):
The basic deploy command: sls deploy
It produces the following output for our stack (of course API Gateway endpoints are different for everybody)
It's possible to limit commands to a single lambda function e.g. when we want to redeploy just a single function or check it's logs.
sls deploy -f {function_name}
sls logs -f {function_name}
In order to get the information about our service we can use sls info
When we want to clean up and remove the service from AWS we can run sls remove
.
This should remove all the resources created in the AWS, leaving only the ones having DeletionPolicy: Retain
specified.
In our case S3 buckets.