I have a streaming data, and I have to use at least 2 lambda functions to process each coming record of data. Basically, when a lambda functions processes a coming record, it will validate several conditions and finally it will generate a new row data and save it to my database, this new row has a column called 'occurrence' denote the occurrence of this new row in my database.I have to use more than 2 lambda functions because the coming data is so huge and I want to speed up the process. But this causes a problem, more specifically, let say that I have 2 lambda functions A and B, and there are 2 coming record x and y at once and A processes x, B processes y. After processing x and y, A and B will generate the new rows x' and y' respectively. But there is a possibility that x' will be the same as y' and when A and B save x' and y' to my database, the occurences columns of x' (also y') only increases by 1 (because A and B will first find the existing data for x'(also y') in my database, and then update the column 'occurrence' ), but the increase here should be 2. This problem will not happen if I use only one lambda function. I think the solution should be from how I store and update data or how I manage 2 running lambda functions at once. But so far, I could not figure it out. Any help will be appreciated.