Are Lambda functions doing so much now that they they can’t just be run locally?
I get that if you’re trying to access some AWS service, this could be helpful but in that case I thought the general consensus is basically mock things out.
I get that if you’re trying to access some AWS service, this could be helpful but in that case I thought the general consensus is basically mock things out.
For serious software you want a proper local/unit test setup anyway. Using this in your dev cycles is just the natural next step. Instead of waiting for the cdk/cfn deploy to finish, which really is way too slow, you just execute 'jest' or whatever test framework you have.
Sure, figuring out how to mock everything takes some upfront time, but it pays off in the long run.
For deployment I have a generic "wrapper" that makes it lambda-compatible by converting a webEvent -> Json and my outputJSON -> web response event.