Description
This is a Feature Proposal
Description
Thanks for the plugin!
The serverless-step-functions
plugin provides integration to the API Gateway by adding a hook to invoke the step function via the StartExecution
action. When invoked, it returns the following output:
{
"executionArn": "string",
"startDate": number
}
This is not particularly useful if we want to use the step function as an API endpoint to wait for output. AWS supports a DescribeExecution
event for step functions that, when the function has been completed, will provide output. Naturally, the executionArn
has to be provided to invoke this action.
There are other ways to get output (the step function could theoretically call an endpoint to cause some type of web-socket communications), but short polling DescribeExecution
seems like a common enough use case. It's pretty easy to create an integration to DescribeExecution
via the API Gateway within the AWS console, but it does not appear to be supported easily in this plugin.
This might necessitate that the events
configuration be changed a bit to distinguish between StartExecution
and DescribeExecution
. E.g.:
events:
-
http:
path: status
method: get
cors: true
action: DescribeExecution
Is this at all reasonable?
Additional Data
- Serverless Framework Core Version you're using: latest
- The Plugin Version you're using: latest
- Operating System: N/A
- Stack Trace: N/A
- Provider Error messages: N/A