Skip to content

[Proposal] Pure StepFunction #12

@claudiopastorini

Description

@claudiopastorini

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.

@app.step_function(state_machine_name="register-user")
def register():
    return REGISTER_USER_STEP_FUNCTION_DEFINITON

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.

See #13

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions