This is the right answer. He’s immediately closing the browser after clicking the button. He should wait for a success UI or at least that the resulting network call finishes with success or a failure to retry on. Not lambdas fault, it’s performing as coded.
This wasn't obvious to me just looking at the problem from a distance, but thankfully testing reduces the level of skill required to get something right :)
If you terminate the system right after sending a form there is no guarantee that the data even left the local buffers for the network.