forked from serverless/serverless
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
separate commands into separate pages
- Loading branch information
1 parent
dfac939
commit c27e01f
Showing
12 changed files
with
140 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<!-- | ||
title: Serverless Framework Commands - AWS Lambda - Deploy Function | ||
menuText: Deploy Function | ||
menuOrder: 5 | ||
description: Deploy your AWS Lambda functions quickly without cloudformation | ||
layout: Doc | ||
--> | ||
|
||
<!-- DOCS-SITE-LINK:START automatically generated --> | ||
### [Read this on the main serverless docs site](https://www.serverless.com/framework/docs/providers/aws/cli-reference/deploy-function) | ||
<!-- DOCS-SITE-LINK:END --> | ||
|
||
# Deploy Function | ||
|
||
The `sls deploy function` command deploys an individual function without AWS CloudFormation. This command simply swaps out the zip file that your CloudFormation stack is pointing toward. This is a much faster way of deploying changes in code. | ||
|
||
```bash | ||
serverless deploy function -f functionName | ||
``` | ||
|
||
## Options | ||
- `--function` or `-f` The name of the function which should be deployed | ||
- `--stage` or `-s` The stage in your service that you want to deploy to. | ||
- `--region` or `-r` The region in that stage that you want to deploy to. | ||
|
||
## Examples | ||
|
||
### Deployment without stage and region options | ||
|
||
```bash | ||
serverless deploy function --function helloWorld | ||
``` | ||
|
||
### Deployment with stage and region options | ||
|
||
```bash | ||
serverless deploy function --function helloWorld --stage dev --region us-east-1 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<!-- | ||
title: Serverless Framework Commands - AWS Lambda - Deploy List | ||
menuText: Deploy List | ||
menuOrder: 6 | ||
description: List your previous CloudFormation deployments | ||
layout: Doc | ||
--> | ||
|
||
<!-- DOCS-SITE-LINK:START automatically generated --> | ||
### [Read this on the main serverless docs site](https://www.serverless.com/framework/docs/providers/aws/cli-reference/deploy-list) | ||
<!-- DOCS-SITE-LINK:END --> | ||
|
||
# Deploy List | ||
|
||
The `sls deploy list` command will list your recent deployments available in your S3 deployment bucket. It will use stage and region from the provider config and show the timestamp of each deployment so you can roll back if necessary using `sls rollback`. | ||
|
||
## Options | ||
|
||
- `--stage` or `-s` The stage in your service that you want to deploy to. | ||
- `--region` or `-r` The region in that stage that you want to deploy to. | ||
|
||
## Artifacts | ||
|
||
After the `serverless deploy` command runs all created deployment artifacts are placed in the `.serverless` folder of the service. | ||
|
||
## Examples | ||
|
||
### List existing deploys | ||
|
||
```bash | ||
serverless deploy list --stage dev --region us-east-1 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<!-- | ||
title: Serverless Framework Commands - AWS Lambda - Invoke Local | ||
menuText: Invoke Local | ||
menuOrder: 8 | ||
description: Emulate an invocation of your AWS Lambda function locally using the Serverless Framework | ||
layout: Doc | ||
--> | ||
|
||
<!-- DOCS-SITE-LINK:START automatically generated --> | ||
### [Read this on the main serverless docs site](https://www.serverless.com/framework/docs/providers/aws/cli-reference/invoke-local) | ||
<!-- DOCS-SITE-LINK:END --> | ||
|
||
# Invoke Local | ||
|
||
This runs your code locally by emulating the AWS Lambda environment. Please keep in mind, it's not a 100% perfect emulation, there may be some differences, but it works for the vast majority of users. We mock the `context` with simple mock data. | ||
|
||
```bash | ||
serverless invoke local --function functionName | ||
``` | ||
|
||
## Options | ||
|
||
- `--function` or `-f` The name of the function in your service that you want to invoke locally. **Required**. | ||
- `--path` or `-p` The path to a json file holding input data to be passed to the invoked function. This path is relative to the root directory of the service. The json file should have event and context properties to hold your mocked event and context data. | ||
- `--data` or `-d` String data to be passed as an event to your function. Keep in mind that if you pass both `--path` and `--data`, the data included in the `--path` file will overwrite the data you passed with the `--data` flag. | ||
|
||
## Examples | ||
|
||
### Local function invocation | ||
|
||
```bash | ||
serverless invoke local --function functionName | ||
``` | ||
|
||
This example will locally invoke your function. | ||
|
||
### Local function invocation with data | ||
|
||
```bash | ||
serverless invoke --function functionName --data "hello world" | ||
``` | ||
|
||
```bash | ||
serverless invoke --function functionName --data '{"a":"bar"}' | ||
``` | ||
|
||
### Local function invocation with data from standard input | ||
|
||
```bash | ||
dataGenerator.js | serverless invoke local --function functionName | ||
``` | ||
|
||
### Local function invocation with data passing | ||
|
||
```bash | ||
serverless invoke local --function functionName --path lib/data.json | ||
``` | ||
|
||
This example will pass the json data in the `lib/data.json` file (relative to the root of the service) while invoking the specified/deployed function. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters