What happens if I call SendTaskSuccess multiple times for the same task?

0

A step function workflow I'm working on needs to call an external service and wait for it to complete before continuing, so I'm using WAIT_FOR_TASK_TOKEN integration. The external service does not do task token callbacks, it notifies via SNS. So we have a lambda subscribed to the SNS topic, and when it gets triggered it looks up the appropriate task token then calls SendTaskSuccess to continue the workflow.

However, SNS does not guarantee that a notification will only be delivered once, it could show up multiple times. So what happens if I call SendTaskSuccess with a task token, then call it again with the same task token? My assumption is that it would throw an exception, but I have not found documentation stating that, or exactly what exception would be thrown.

Any help would be appreciated

已提问 2 年前1050 查看次数
1 回答
1
已接受的回答

The second time will fail with a Task does not exist error.

profile pictureAWS
专家
Uri
已回答 2 年前
profile picture
专家
已审核 1 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则