Recently we set up an internal tool aimed to run several types of workflows to produce reports for upper management. We already use AWS Simple Workflow Service in a similar service, but knowing the overhead it brings in terms of dependency management, testing and initialization, we decided to investigate an alternative offered by AWS: Step Functions, the service launched recently during re:Invent 2016.
With some tricks, we determined it could be a good alternative for SWF and below are several conclusions we found relevant about this new solution.
- Very nice and useful integration with CloudWatch, having access to detailed graphs per state and per activities. This is an important aid for debugging, but in case you have a recurrent state machine, monitoring and alarming is fundamental, so Cloudwatch support really helps.
- Documentation should provide more examples. You’ll see that if your use case requires a more complex state or if you want to add a fancier retry policy you have to experiment by yourself because prototypes found in documentation are not the most relevant.
- The AWS Step Function console is really nice and useful. Especially the Preview box where you can validate your state JSON. A bug (maybe?!) we noticed is the fact that you cannot expand a state while it has 0 executions. This decision is a little bit weird, we hope it’s an error that is going to be fixed. Basically, you cannot see the state JSON if that state has 0 executions.
- Some features are missing, but the service is quite young. For example it would be nice to be able to save the output of a state in S3 or to have a predefined output from a wait state or even nicer to receive a notification if an executions is completed or failed. But for sure we’ll see soon these gaps solved.
- The last but the most important is the pricing model. For sure it’s not the most friendly one at least if you use it to trigger a Lambda function. In our point of view it should follow the same “pay only for what you use” model, in agreement with Elastic Beanstalk, CloudFormation or ECS. AWS Step Functions charges per state transition and not per state machine execution, causing a final bill quite hard to neglect, but mandatory in some cases. This last aspect was not meant a blocker for you, but rather as an aspect you have to consider in the complete picture.
To sum up, AWS Step Function comes with a lot of nice features that makes workflow coordinations simpler and the shortcomings we listed are due to its youth, but for sure in the upcoming future will see them solved.
If you have any questions or comments, let us know here in the comment section of the blog!