Skip to content

tptshepo/aws-sfn-graph

Repository files navigation

AWS Step Functions Graph

React library to visualise the AWS Step Functions ASL JSON.

Install

npm install --save aws-sfn-graph

Usage

import React from 'react'

import AWSSfnGraph from '@tshepomgaga/aws-sfn-graph';
import '@tshepomgaga/aws-sfn-graph/index.css';

const aslData = {
  Comment:
    'A Hello World example of the Amazon States Language using Pass states',
  StartAt: 'Hello',
  States: {
    Hello: {
      Type: 'Pass',
      Result: 'Hello',
      Next: 'World'
    },
    World: {
      Type: 'Pass',
      Result: 'World',
      End: true
    }
  }
}

const App = () => {
  return (
    <AWSSfnGraph
      data={aslData}
      width={500}
      height={500}
      onError={console.log}
    />
  )
}

export default App

Results

alt text

License

MIT © tptshepo