serverless-step-functions
serverless-step-functions copied to clipboard
Set the TimeoutSeconds for Task states
This is a Feature Proposal
Description
One constant pain point with Step Functions is that Lambda time outs are not captured by States.timeout
. You'd need to set TimeoutSeconds
explicitly and make it match the Lambda function's timeout - easy to forget and confusing as hell every time I had to explain to a newcomer that "Lambda timeouts are not treated as timeouts in Step Functions, you gotta do this...".
Since we have the configuration for every function that we're ref'ng directly in the project, we can automatically inject the TimeoutSeconds
to Task
states.
This shouldn't be a breaking change, so we can make it a configuration option, e.g.
stepFunctions:
stateMachines:
myStateMachine:
name: blah
configureTaskTimeouts: true # defaults to false to keep backward compatibility
definition: ...
@horike37 what do you think?
@theburningmonk
That functionality looks good 👍 And 100% agree with adding configureTaskTimeouts
statement.
Thanks for the proposal as always!