Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Step function exceeding the maximum number of characters service limit

My state in a step function flow returns an error of state/task returned a result with a size exceeding the maximum number of characters service limit.. In the step function documentation, the limit for characters for input/output is 32,768 characters. Upon checking the total characters of my result data if falls below the limit. Are there any other scenarios that it will throw that error? Thanks!

like image 499
Abdullah Avatar asked Apr 16 '19 07:04

Abdullah


1 Answers

2020-09-29 Edit: Step Functions now supports 256KB payloads!

256KB is the maximum size of the payload that can be passed between states. You could also exceed this limit from a Map or Parallel state, whose final output is an array with the output of each iteration or branch.

https://aws.amazon.com/about-aws/whats-new/2020/09/aws-step-functions-increases-payload-size-to-256kb

The recommended solution from the Step Functions documentation is to store the data somewhere else (e.g. S3) and pass around the ARN instead of raw JSON.

https://docs.aws.amazon.com/step-functions/latest/dg/avoid-exec-failures.html

You can also use OutputPath to reduce the output to the fields you want to pass to the next state.

https://docs.aws.amazon.com/step-functions/latest/dg/input-output-outputpath.html

like image 120
adamwong Avatar answered Sep 29 '22 09:09

adamwong