aws / serverless-application-model

The AWS Serverless Application Model (AWS SAM) transform is a AWS CloudFormation macro that transforms SAM templates into CloudFormation templates.
https://aws.amazon.com/serverless/sam
Apache License 2.0
9.34k stars 2.38k forks source link

Support Step Function Actions in Api Gateway #1664

Open drewsb opened 4 years ago

drewsb commented 4 years ago

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
jfuss commented 4 years ago

@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.

drewsb commented 4 years ago

@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.

shohei-ihaya commented 3 years ago

any updates ?