I would like to know how to define a whole state machine in Amazon State Language and provision it as a resource in CDK using the CustomState construct in CDK.
const stateJson = {
"Comment": "A Hello World example of the Amazon States Language using Pass states",
"StartAt": "Hello",
"States": {
"Hello": {
"Type": "Pass",
"Result": "Hello",
"Next": "World"
},
"World": {
"Type": "Pass",
"Result": "World",
"End": true
}
}
};
const custom = new sfn.CustomState(this, 'my custom task', {
stateJson,
});
//maybe I should use something else than the chain construct?
const definition = sfn.Chain.start(custom);
new sfn.StateMachine(this, 'my state machine', {
definition
});
❓ Guidance Question
The Question
I would like to know how to define a whole state machine in Amazon State Language and provision it as a resource in CDK using the CustomState construct in CDK.
Environment
Other information
Something like: