Is it possible to run with DynamoDB locally? Or to at least have the code intelligently use DynamoDB or FileDB depending on stage?


In, @jan seems to say we can set things up so development (default) runs with FileDB while production runs with DynamoDB. It seems to imply that to support this, app.js would require and app.use both databases.

If I do that, following the pattern shown there, then initializing DynamoDB in non-prod execution complains that the table name hasn’t been set.

Does the javascript code need to conditionally select one or the other database so dynamodb isn’t initialized when not being used? If so, is there a best practice for writing that conditional… and shouldn’t the tutorial spell that out?

If not, any idea what I’m doing wrong?


You could do something like this:

if (Project.getStage() === 'prod') {
    new DynamoDb({
      tableName: process.env.DATABASE_USER
} else {
  app.use(new FileDb());


Yes, this is something that’s not super intuitive, which we updated in v4:


Uhm… Looks reasonable, but where do I get Project? It isn’t defined in my code…


Project.getStage() is a shortcut for process.env.JOVO_STAGE

const { App, Project } = require('jovo-framework');


Tnx! (Yep, that did it. Now I need to get the lambda up and running.)


To answer the original question: YES, DynamoDB can be downloaded and run locally. See

That’s going to be helpful for other parts of my application. Lambdas run with an immutable filesystem, so storing any state information requires something like a database service.