Okay, yes, I wasn't clear enough on that one, but I also didn't cover this in the article, explicitly.
It is actually never guaranteed that two invocations of your Lambda functions use the same VM. That's up to the management layer.
Multiple invocations in your case will most likely have lead to multiple VMs being sound up with your image. And some of those were reused later, so your temp files were still there.
There sadly is not a lot of explicit documentation on that behavior, as it is also relevant for security, so information is pretty rare. :)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Okay, yes, I wasn't clear enough on that one, but I also didn't cover this in the article, explicitly.
It is actually never guaranteed that two invocations of your Lambda functions use the same VM. That's up to the management layer.
Multiple invocations in your case will most likely have lead to multiple VMs being sound up with your image. And some of those were reused later, so your temp files were still there.
There sadly is not a lot of explicit documentation on that behavior, as it is also relevant for security, so information is pretty rare. :)