JSPM

  • Created
  • Published
  • Downloads 137864
  • Score
    100M100P100Q165893F
  • License MIT

The module is AWS Step Functions plugin for Serverless Framework

Package Exports

  • serverless-step-functions

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (serverless-step-functions) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

serverless Build Status

Serverless Step Functions

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

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.

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>