You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Similar to the Pure Lambda's Chalice support I propose to think about a new way to generate Step Functions through Domovoi.
I think that one big limit now is to support only one Step Function for a project. Another limit is that you cannot deploy a Step Function with all Resources defined somewhere (maybe through another Chalice project with @app.lambda_function() decorator).
In order to resolve these problems, I started to think about a new decorator that allows to generate a Step Function by only the state machine definition returned by it.
The step_function() decorator accepts one arg, an optional state_machine_name parameter if you don't want to use the python function name (very similar to the @app.lambda_function()) as Step Function name.
When you deploy the project Domovoi will create a new Step Function with the name {appname}-{stage}-{step_function_name}.
Doing this will allow us to define more than one Step Function inside the same project.
The step_function_task() decorator will remain but it will accept now another optional state_machine_name parameter that allow the user to give a name to the Step Function, if not provided will be used only the name {appname}-{stage}. You will be able to use both the step_function() and step_function_task() using the same step_function_name.
I started to work on it because I discovered the power of the Step Function and I want to be able to improve the performance of my already defined APIs using Chalice route() and lambda_function() decorators.
Similar to the Pure Lambda's Chalice support I propose to think about a new way to generate Step Functions through Domovoi.
I think that one big limit now is to support only one Step Function for a project. Another limit is that you cannot deploy a Step Function with all Resources defined somewhere (maybe through another Chalice project with
@app.lambda_function()
decorator).In order to resolve these problems, I started to think about a new decorator that allows to generate a Step Function by only the state machine definition returned by it.
The
step_function()
decorator accepts one arg, an optionalstate_machine_name
parameter if you don't want to use the python function name (very similar to the@app.lambda_function()
) as Step Function name.When you deploy the project Domovoi will create a new Step Function with the name
{appname}-{stage}-{step_function_name}
.Doing this will allow us to define more than one Step Function inside the same project.
The
step_function_task()
decorator will remain but it will accept now another optionalstate_machine_name
parameter that allow the user to give a name to the Step Function, if not provided will be used only the name{appname}-{stage}
. You will be able to use both thestep_function()
andstep_function_task()
using the samestep_function_name
.I started to work on it because I discovered the power of the Step Function and I want to be able to improve the performance of my already defined APIs using Chalice
route()
andlambda_function()
decorators.See #13
The text was updated successfully, but these errors were encountered: