top | item 39032428

(no title)

mattchamb | 2 years ago

The company I work at is using step functions heavily and I hate it. Instead of an if statement they make it a new step with the conditional in json, so following the code required you to jump around between files.

It has also been built by contractors who have no incentives to make it run locally or be easy to manage in production, but that isn't specific to step functions, and more due to poor leadership.

discuss

order

Yhippa|2 years ago

I never thought about it that way. Sounds like step functions could end up "spaghetti code on steroids" if you do it poorly.

frfl|2 years ago

Imagine using JSON as a programming language. And all the implications of that. AWS does provide a VS Code and web renderer for the JSON to visually see what the flow of the step function looks like, but this is just a small improvement overall. If you split up your step functions into multiple, where one step function can call another, also invoke lambdas and other things, then you can imagine you lose all benefits of a modern code editor/IDE and you're manually lookup which file to jump to in order to find the next step in the execution path.

To be fair AWS does provide a "CDK" which lets you write Python code that gets converted into their JSON DSL -- or something along those lines. But I haven't used that, only direct JSON DSL "code" to write step functions.