serverless-step-functions icon indicating copy to clipboard operation
serverless-step-functions copied to clipboard

Set the TimeoutSeconds for Task states

Open theburningmonk opened this issue 4 years ago • 2 comments

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

theburningmonk avatar Aug 08 '19 22:08 theburningmonk

@horike37 what do you think?

theburningmonk avatar Aug 08 '19 22:08 theburningmonk

@theburningmonk That functionality looks good 👍 And 100% agree with adding configureTaskTimeouts statement. Thanks for the proposal as always!

horike37 avatar Aug 09 '19 07:08 horike37