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

Is the same thread used between each task in a AWS step function?


Suppose I have a step function with only two tasks: start -> task 1 -> task 2 -> end.

Just wonder if the same thread is used in task 1 and task 2.

The scenario is like this. We set some resources at the beginning of a thread execution. Those resources need to be closed ONLY when the thread ends.

So if task 1 and 2 share the same thread, need to close them at the end of task 2. But if not, then need to close the resource in both task 1 and 2.


Solution

  • No they don't share a CPU thread. They may not even run on the same underlying server.