sugary-sweet state machine syntax
Warning: this is an early stage work-in-progress and is under heavy development.
install
npm i sota
what is sota?
Simple: It's just Amazon State Language... with enough sugar piled on to mask the notoriously bitter aftertaste.
Let's say you saved the following to a file called state-machine.pdn
...
arn:aws:lambda:us-east-1:12345679:function:foo
arn:aws:lambda:us-east-1:12345679:function:bar
[
[
arn:aws:states:us-east-1:12345679:activity:a
arn:aws:lambda:us-east-1:12345679:function:a
]
[
arn:aws:states:us-east-1:12345679:activity:c
@try [
arn:aws:states:us-east-1:12345679:activity:d
arn:aws:states:us-east-1:12345679:activity:c
]
@retry [
arn:aws:states:us-east-1:12345679:activity:e
]
]
]
@if [
[$.foo >= 1565317676]
arn:aws:lambda:us-east-1:12345679:function:foo
boom
]
@fail boom
And then you ran it through sota like so...
cat state-machine.pdn | sota
Well, if you did that, you'd get the following: