Search code examples
amazon-web-servicesaws-step-functions

AWS Step function task token sendTaskSuccess cross region


I have case where the task token is received as an input from [Account A Region A] to the lambda deployed in [Account B Region B]. When sending the sendTaskSuccess/sendTaskFailure, should the lambda in Account B create sfnClient with Region A for this to work?

Are the task tokens region specific?

The problem is we only receive the task token as an input in Account B (no info about the region).


Solution

  • Task tokens are region specific. I validated this by deploying the sample code. The Sfn client has to be configured to the same AWS region as that of the state machine. If its in a different region, you will get this error message ERROR Invalid Token: 'Invalid token'