Skip to content
Demo project to illustrate how to implement blue-green deployment with Step Functions so you don't break existing executions.
JavaScript
Branch: master
Clone or download

README.md

step-functions-bluegreen-deploy-demo

Demo project to illustrate how to implement blue-green deployment with Step Functions so you don't break existing executions.

For more details, check out this blog post.

To try this out yourself:

  1. run npm install to install the dependencies

  2. switch to the v1 branch and run npm run sls -- deploy --alias v1

  3. once deployed, trigger a new execution by running npm run sls -- invoke stepf --name myStateMachine --data '{"foo":"bar"}'. You can inspect the Step Functions console to see that the execution is running and is in the Wait state for 5 mins.

  4. switch to the v2 branch and run npm run sls -- deploy --alias v2

  5. once deployed, trigger another execution by running npm run sls -- invoke stepf --name myStateMachine --data '{"foo":"bar"}'. This time, the new state machine would complete right away.

The first execution would transition to its Hello state after 5 mins and it will still complete successfully (even though we have changed the output from the hello function as well as the state machine definition).

You can’t perform that action at this time.