Description
When generating the CloudFormation template for an AWS::StepFunctions::StateMachine, use the Definition field not DefinitionString.
Use Case
When things change in the step function definition, using DefinitionString leads to a completely inscrutable CDK diff. For example, while switching from Task to LambdaInvoke, some fields in the JSON were reordered, and we got a cdk diff that we weren't expecting and was not at all human readable.
Proposed Solution
Never use DefinitionString. Always use Definition. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-statemachine.html#cfn-stepfunctions-statemachine-definition
Other information
No response
Acknowledge
Description
When generating the CloudFormation template for an AWS::StepFunctions::StateMachine, use the Definition field not DefinitionString.
Use Case
When things change in the step function definition, using DefinitionString leads to a completely inscrutable CDK diff. For example, while switching from
TasktoLambdaInvoke, some fields in the JSON were reordered, and we got a cdk diff that we weren't expecting and was not at all human readable.Proposed Solution
Never use DefinitionString. Always use Definition. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-statemachine.html#cfn-stepfunctions-statemachine-definition
Other information
No response
Acknowledge