Skip to content

Commit

Permalink
Merge branch 'master' of github.com:horike37/serverless-step-functions
Browse files Browse the repository at this point in the history
  • Loading branch information
horike37 committed Dec 30, 2016
2 parents 2f4ba46 + d21e15e commit 7c29617
Showing 1 changed file with 49 additions and 1 deletion.
50 changes: 49 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,51 @@
[![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)
# Serverless Step Functions
[WIP]..
Serverless plugin for AWS Step Functions.

## Install
Run `npm install` in your Serverless project.
```
$ npm install --save serverless-step-functions
```

Add the plugin to your serverless.yml file
```yml
plugins:
- serverless-step-functions
```
## Setup
Write definitions yaml using Amazon States Language in a `stepFunctions` statement in serverless.yml.
`Resource` statements refer to `functions` statements. Therefore, you do not need to write a function arn directly.

```yml
functions:
hellofunc:
handler: handler.hello
stepFunctions:
hellostepfunc:
Comment: "A Hello World example of the Amazon States Language using an AWS Lambda Function"
StartAt: HelloWorld
States:
HelloWorld:
Type: Task
Resource: hellofunc
End: true
```

## Usage
### deploy
```
$ sls deploy stepf --state <stepfunctionname>
```
### invoke
```
$ sls invoke stepf --state <stepfunctionname> --data '{"foo":"bar"}'
```
### remove
```
$ sls remove stepf --state <stepfunctionname>
```

0 comments on commit 7c29617

Please sign in to comment.