aws-cdk-state-machine-asl
aws-cdk-state-machine-asl copied to clipboard
Fails out on simple state machines
If a state machine is filled with simple Pass
states, cdk
synthesizes it into a definition string already. When this occurs, this code breaks the entire process.
const [delimiter, values] = expression;
^
TypeError: expression is not iterable
A simple fix I made locally to bypass this is:
const nestedDefinitionString = definition["Fn::Join"];
if (!nestedDefinitionString) {
console.log("In definition string format, skipping asl generation...")
return;
}
const asl = fnJoin(nestedDefinitionString)
@alynchos can you tell where did you make this fix to resolve the error?
@alynchos can you tell where did you make this fix to resolve the error?
I made a local fork and added that code here: https://github.com/nathanagez/aws-cdk-state-machine-asl/blob/main/index.js#L15