aws-cli icon indicating copy to clipboard operation
aws-cli copied to clipboard

Import AWS Step Functions state machine definition from external file

Open alexcasalboni opened this issue 7 years ago • 7 comments

Officially, AWS::StepFunctions::StateMachine only allows a string definition as follows:

MyStateMachine:
    Type: AWS::StepFunctions::StateMachine
    Properties: 
        DefinitionString: "..."
        RoleArn: "..."
        StateMachineName: "..."

but it'd be great to be able to import/include/package the state machine definition from an external JSON file.

Something like this:

MyStateMachine:
    Type: AWS::StepFunctions::StateMachine
    Properties: 
        Definition: "definition.json"
        RoleArn: "..."
        StateMachineName: "..."

and then aws cloudformation package could take care of it.

I don't think if this would be easier/better to implement in the AWS SAM CLI since the sam pacakge command is just an alias of aws cloudformation package.

Any thoughts? Ping @heitorlessa

alexcasalboni avatar Jul 22 '19 00:07 alexcasalboni

@alexcasalboni - Thanks for posting this feature. This feature request needs to be submitted to the CloudFormation service team on their forums. If you can post the forum link here, I can escalate it internally.

justnance avatar Jul 22 '19 17:07 justnance

Here is the forum post I've just created: https://forums.aws.amazon.com/thread.jspa?threadID=306819

alexcasalboni avatar Jul 23 '19 17:07 alexcasalboni

Thanks. I've escalated the request to the service team. I'm going to close out this GitHub issue so we can move the follow up to the forums.

justnance avatar Jul 23 '19 20:07 justnance

Why don't we keep this issue open until the problem is actually solved?

alexcasalboni avatar Jul 23 '19 21:07 alexcasalboni

@alexcasalboni - Thanks for the feedback. As per our README, we reserve the GitHub issues for tracking bugs and feature requests related to the CLI. Issues and feature requests with the AWS services need to be moved to the service team forums or via a AWS Premium Support case.

justnance avatar Jul 24 '19 16:07 justnance

Bump, this is needed to set up a proper CI/CD for a larger system of state machines

beetree avatar Feb 16 '20 04:02 beetree

Bump! This would be really great, so that the state machine logic does not reside in the template itself.

rito-sixt avatar Nov 22 '21 06:11 rito-sixt