By using AWS re:Post, you agree to the Terms of Use

Cannot directly set up BatchGetItem step inside a State Machine


I had been struggling to add a BatchGetItem step inside an Express State Machine in AWS Step Functions.

I followed the request syntax inside this document ( but when I start modifying the JSON inside API parameters, Step Function prompts two error messages, saying that two parameters' values are mandatory, which doesn't match documentation for BatchGetItem. These errors show up as soon as I try to replace the values of Key inside the API parameters

After struggling for a while, and because the prompted errors didn't make sense, I found a trick to bypass the error, which is also a way to reproduce this issue

  • Add the BatchGetItem
  • Try to modify the value of Key, get two error messages ("prompts")
  • Quit modifying the value of Key and just leave it as it is. Save your state machine
  • Click on edit the workflow, and try again to modify the value of Key.
  • No errors will show up this time.

I'm wondering if by following the steps above I'm doing something wrong, or if this is an actual bug?

  • If you can share the code of the step functions part, it will be easier to understand what is the issue. The internal language of the step functions flows can be confusing.