Reputation: 95
This sounds basic but how can I edit an existing States Machine?
Currently what I do, is creating a new one from scratch using the code of previous version, which is obviously ridiculous.
Thanks
Upvotes: 2
Views: 3409
Reputation: 1688
Update: November 2017.
You can finally now edit Step Functions.
See the new "Edit state machine" button on the Step Function page.
Upvotes: 2
Reputation: 1345
Editing and versioning of Step Functions is coming, per AWS: https://forums.aws.amazon.com/thread.jspa?threadID=244167
We plan to work on editing and version for State Machine, in the mean time creating a new state machine is how you edit the flow of the state machine
Upvotes: 0
Reputation: 5577
You can't. It doesn't make sense for UI, but it does for internal system. It would be disaster to run different versions of state machine at same time. To deal with update gracefully, they should support versions/deployments like Lambda, but currently it's not there.
At this point, probably the most user friendly approach is deploying state machines using CloudFormation template. https://docs.aws.amazon.com/step-functions/latest/dg/tutorial-lambda-state-machine-cloudformation.html Be warned, it's slow and fails miserably when your SF code contains error - you have to delete CloudFormation stack before trying again.
So maybe your own little script is going to be more productive. Note how CloudFormation creates State Machine with your specified name + random characters MyName-PAIXTGYUBZJD
. You could take any small sized hash of state machine code to generate unique suffix.
Maybe apex is going to support state machines in its glorious way. Vote here https://github.com/apex/apex/issues/698
Upvotes: 1