Skip to content

Commit 7c29617

Browse files
committed
Merge branch 'master' of github.com:horike37/serverless-step-functions
2 parents 2f4ba46 + d21e15e commit 7c29617

File tree

1 file changed

+49
-1
lines changed

1 file changed

+49
-1
lines changed

README.md

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,51 @@
11
[![serverless](http://public.serverless.com/badges/v3.svg)](http://www.serverless.com) [![Build Status](https://travis-ci.org/horike37/serverless-step-functions.svg?branch=master)](https://travis-ci.org/horike37/serverless-step-functions)
22
# Serverless Step Functions
3-
[WIP]..
3+
Serverless plugin for AWS Step Functions.
4+
5+
## Install
6+
Run `npm install` in your Serverless project.
7+
```
8+
$ npm install --save serverless-step-functions
9+
```
10+
11+
Add the plugin to your serverless.yml file
12+
```yml
13+
plugins:
14+
- serverless-step-functions
15+
```
16+
17+
## Setup
18+
Write definitions yaml using Amazon States Language in a `stepFunctions` statement in serverless.yml.
19+
`Resource` statements refer to `functions` statements. Therefore, you do not need to write a function arn directly.
20+
21+
```yml
22+
functions:
23+
hellofunc:
24+
handler: handler.hello
25+
26+
stepFunctions:
27+
hellostepfunc:
28+
Comment: "A Hello World example of the Amazon States Language using an AWS Lambda Function"
29+
StartAt: HelloWorld
30+
States:
31+
HelloWorld:
32+
Type: Task
33+
Resource: hellofunc
34+
End: true
35+
```
36+
37+
## Usage
38+
### deploy
39+
```
40+
$ sls deploy stepf --state <stepfunctionname>
41+
```
42+
43+
### invoke
44+
```
45+
$ sls invoke stepf --state <stepfunctionname> --data '{"foo":"bar"}'
46+
```
47+
48+
### remove
49+
```
50+
$ sls remove stepf --state <stepfunctionname>
51+
```

0 commit comments

Comments
 (0)