seriously, its a function. if you remove the aws/lambda specifics you _should_ have something testable that you then call from your lambda handler.
The good news; you should be able to accomplish most testing locally, in memory. The bad news; your test code is probably going to be much larger and your going to have to be very aware of the data model representing the interface to the lambda and you're going to have to test the different possible states of that data.