Skip to content
This repository has been archived by the owner on Nov 22, 2023. It is now read-only.

Serverless plugin to support step functions in Offline

License

Notifications You must be signed in to change notification settings

smunch-co/serverless-offline-step-functions

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

serverless-offline-step-functions

Serverless Offline plugin to support step functions.

Installation

# dependencies:
$ npm install -D serverless-offline, serverless-step-functions

# the fun stuff
$ npm install -D serverless-offline-step-functions

Usage

  • Add to plugins section in serverless.yml:
plugins:
  - serverless-step-functions
  - serverless-offline-step-functions
  - serverless-offline
  • If your resources have a prefix added during deploy time, add the resourcePrefix confing to the serverless.yml custom section. This will allow serverless-offline-step-functions to find the resources. See below for an example:
custom:
  serverless-offline-step-functions:
    resourcePrefix: ${self:service}-${self:provider.stage}-

Server

The plugin also sets up a server to run any lambdas that make use of the StepFunctions API in the aws-sdk. The default port is 8014; however, you can specify which port to listen to like so:

custom:
  serverless-offline-step-functions:
    port: 8014

Serveless Offline will now be able to run your state machines similar to AWS!

Supported States

  • Task
  • Pass
  • Wait
  • Succeed
  • Fail
  • Choice
  • Parallel

Example Project and Docs

For a full (Hello World) example project, take a look at this repo:

Learning AWS Step Functions

For a walkthrough of the example project and to learn more about AWS States and Step Functions, checkout my post on Medium:

Stepping Through AWS Step Functions

For AWS' documentation, you can start here:

What Is AWS Step Functions?

About

Serverless plugin to support step functions in Offline

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%