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!
Asked
Active
Viewed 2.4k times
22

Abdullah
- 603
- 3
- 8
- 19
-
6The way I went about doing this is saving things to s3, then passing the path to the file around, rather than passing the data. I understand this isn't the question, but it may help to do that instead. – Slabgorb Apr 16 '19 at 16:15
-
@Slabgorb thanks, I used s3 for my input and result path. – Abdullah Apr 17 '19 at 05:33
-
Maximum payload size was just increased to 256KB: https://aws.amazon.com/about-aws/whats-new/2020/09/aws-step-functions-increases-payload-size-to-256kb/ – Tulio Casagrande Sep 08 '20 at 11:49
1 Answers
23
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.
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

adamwong
- 1,035
- 6
- 11