Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can a Amazon States Language json file be generated from CDK step functions TS file

If I have a CDK *.ts file that defines my AWS Step Functions, is it possible to generate an Amazon States Language asl.json file that I can use it to visualize that step function process (using the AWS Toolkit for VS)?

I took a look at: Is there a way of running AWS Step Functions locally when defined by CDK?, Is there a way to create step functions graph using CDK?, and the AWS CDK for Step Functions: https://docs.aws.amazon.com/cdk/api/latest/docs/aws-stepfunctions-readme.html but none of those resources indicated a process to generate that asl.json file. The AWS Step Function module has an Import, what I am looking for is essentially, the reverse or an Export.

like image 522
Perry Hoekstra Avatar asked Aug 26 '20 16:08

Perry Hoekstra


1 Answers

AWS Toolkit for Visual Studio Code supports visualization of CDK state machines. Run cdk synth then the state machine resource will appear in the CDK explorer. Right click on it to display the graph.

like image 64
adamwong Avatar answered Oct 20 '22 22:10

adamwong