I am designing a serverless application with AWS Lambda. There's a piece of code on one of the functions that process the request in a certain way. I am going to make another function that's going to make the same processing with the request data, in the same way.
The problem is that, if I change the processing function in one of the Lambda functions, I'm going to have to copy the function and paste in the other Lambda function. Every time I make a change I will have to do this. This will be yet more cumbersome if I want to do the same processing function in more than two Lambda functions.
Is there a way to share pieces of code between Lambda functions, so I may respect DRY principles?