How to test dynamo db stream triggered lambdas, locally?

Hi Serverless community !

Thanks for creating and sharing this beautiful piece of work and wisdom.

I recently started working with the serverless framework, and we are using it internally to remove celery and redis with dynamo db streams and lambda functions.

The problem we face is that we need to deploy the function every time we make the changes, and then trigger an action in order for the stream to be generated and the function to be called.

  • Is there a faster way to do this ? (Preferably, locally, without deploying each time)
  • Is there a way to configure a local dynamo db stream as a trigger event in serverless.yml ?
  • The ideal way we’d want it, is a terminal running the lambda, which gets called each time we make changes to the local dynamo db and updates itself, whenever we change the lambda code.

We have checked solutions like dynamo-db-local plugin, but haven’t yet found support for streams.

Any help, thoughts or opinions will be greatly appreciated !

Regards.

3 Likes

I’m interested in this as well. I found this https://github.com/localstack/localstack after some googling, but I’m curious if there is something that already exists with a tighter integration to the serverless framework.

1 Like

Have you succeeded in locally trigger a Dynamodb locally using localstack? Or does someone already done it locally through an other way?

We use jasmine unit tests, there is no need to test the stream or you just end up testing the AWS platform, imo.