serverless-application-model icon indicating copy to clipboard operation
serverless-application-model copied to clipboard

Support Step Function Actions in Api Gateway

Open drewsb opened this issue 5 years ago • 3 comments

Feature Proposal

Description:

Similar to this post https://github.com/serverless-operations/serverless-step-functions/issues/72 for serverless-framework, I was wondering if there is an easy way to create Api Gateway endpoints that directly invoke Step Functions API actions (e.g. DescribeExecution, ListExecutions, etc.) without creating an entire Api Gateway resource that calls the URL. If not, is this a reasonable feature request? As mentioned in the post I linked, an "Action:" parameter could added to the Events to distinguish the different actions (StartExecution, DescribeExecution, etc.):

Events:
      StateMachineApi:
          Type: Api
          Properties:
            Method: get
            Path: /describe
            Action:DescribeExecution

drewsb avatar Jul 24 '20 22:07 drewsb

@drewsb You should have a look at the AWS::Serverless::StateMachine Resource: https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-resource-statemachine.html

I think that is exactly what you are asking for.

jfuss avatar Aug 07 '20 16:08 jfuss

@jfuss No I'm requesting an enhancement to AWS::Serverless::StateMachine. There is currently no way to invoke a Step Function action from an API Gateway endpoint other than StartExecution.

drewsb avatar Aug 07 '20 16:08 drewsb

any updates ?

shohei-ihaya avatar Sep 12 '21 09:09 shohei-ihaya