DynamoDB emulator nodejs wrapper


0.5.33 years ago3 years agoMinified + gzip package size for @conduitvc/dynamodb-emulator in KB


DynamoDB Emulator

This package contains wrapper logic to download and use the dynamodb emulator.

This package automatically (on install) downloads the latest dynamodb emulator.

Much of the logic in this package is around retrying to start the server. This can be an issue when using jest and there is contention when binding a port.


const emulator = require('@conduitvc/dynamodb-emulator');

async function main() {
  // start the emulator
  const emu = await emulator.launch({
    /* options */
  // by default we launch the emulator on some open port in the ephemeral range in the 'inMemory' mode.

  // get the dynamodb client (aws-sdk)
  const dynamodb = emulator.getClient(emu);



Port to bind the emulator to. If omitted will bind to the first available port in the ephemeral range.

default: null


If to use a single database file to use in the emulator. Should typically be left on.

default: true


Where to launch the database. Will automatically create this directory if missing.

deafult: null


Maximum amount of time to wait for the dynamodb emulator to start listening on it's chosen port.

default: 5000

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.