My CDK infrastructure (a typescript file) has a lambda that will create a new State Machine when it runs. To do so it needs the Amazon State Langauge JSON representation of the machine I want to create. I have created the State Machine within my AWS infrastructure typescript file, since many of the states reference lambdas or dynamoDB tables within this infrastructure.
My question is, given a CDK State Machine (Here is the CDK documentation for it, also here is the documentation for the Step Function's Chain class which basically represents the ASL JSON in CDK) can you generate the ASL JSON representation? In my case it is so I can pass this ASL JSON into one of my lambda's environments.
Based on the documentation it doesn't seem like this is possible which is weird to me since you can just look on the AWS Console, click on your state machine, then click the "definition" tab and see the ASL JSON. There must be some way to access this within the CDK infrastructure where the state machine is defined and created.