A DynamoDB secondary index can select which attribute to project (replicate) to the index. It can project all item attributes, a subset of the attributes or only the key attributes.

If you project only the keys, then a read from the secondary index will return the key attributes. With these keys you can read all the remaining attributes from the primary index, but that will incur an additional read request and require code to manage the second request.

With DynamoDB single-table Designs choosing which attributes to project to secondary indexes can be a challenge. With single-table designs, you store multiple…

DynamoDB provides secondary indexes for fast access via alternate partition and sort keys.

You can create up to 20 secondary indexes on a DynamoDB table to support your access patterns, though with single-table design patterns, you typically need only a couple to support a wide variety of access patterns.

By using sparse secondary indexes, you can minimize your DynamoDB storage costs and not compromise on having fast, efficient queries. You can also improve your ability to evolve your data designs in the future.

Using DynamoDB OneTable makes retrieving data from sparse, key-only secondary indexes easy and cost effective. …

DynamoDB is the leading serverless database in the AWS suite of offerings. It provides an easy to configure, high-performance, NoSQL database with low operational overhead and almost endless scalability.

DynamoDB appeals to developers requiring a simple serverless database and those requiring the utmost in scalability. However, DynamoDB can be used effectively for almost any OLTP application regardless of scale.

This DynamoDB checklist is a collection of the some of the more important items I’ve learned with our SenseDeep serverless trouble shooter that uses single-table design patterns, NodeJS and the DynamoDB OneTable library in production over the past year. …

The DynamoDB database provides an easy to configure, high-performance, NoSQL database with low operational overhead and extreme scalability. It appeals to developers with OLTP applications requiring a simple serverless database or those requiring the utmost in scalability.

Single-Table Designs

More recently, DynamoDB best practices have evolved around single-table design patterns where one database table serves the entire application and holds multiple different application entities. This design pattern offers greater performance by reducing the number of requests required to retrieve information and lowers operational overhead. …

The DynamoDB OneTable Migration CLI is a command line tool for orchestrating DynamoDB migrations when using DynamoDB OneTable and OneTable Migrate.

The CLI is ideal for development teams to initialize and reset database contents and for production use to control and sequence step-wise database upgrades.

OneTable is used by the SenseDeep Serverless Troubleshooter for all DynamoDB access. OneTable is provided open source (MIT license) from GitHub OneTable or NPM OneTable.

OneTable Migrate CLI Features

  • Simple command line utility to control and manage DynamoDB schema and contents.
  • Mutate database schema and contents via discrete, reversible migrations.
  • Migrate upwards, downwards, to specific versions.
  • Automated, ordered sequencing…

Conventional wisdom seems to be that changing a DynamoDB design is extremely difficult and you want to avoid it at all costs.

It is repeated without question that you must determine all your access patterns up front because you cannot easily change your DynamoDB design after the fact. For example:

“you cannot change primary indexes so the only option is to create a new (table), migrate the data with transformations and delete the old table. This process is excruciating, especially in production.”

However, with single table designs, this thinking is out of date and today, is just plain wrong.


How can you easily create an NPM module for ESM and CommonJS?

Preferably without using creating two source bases and without needing Webpack?

That has been a vexing question for a while.

Creating an NPM module from single code base that easily targets both CommonJS and ES modules can be an exercise in frustration. Sometimes called a “hybrid” package, easily creating an NPM module that is simply consumed using import or require is an elusive goal.

On this topic, there are countless blog articles, stack overflow questions and reference pages. These point to various competing strategies, which when tried, work…

DynamoDB OneTable (OneTable) is an access library for DynamoDB applications that use one-table design patterns with NodeJS. OneTable makes dealing with DynamoDB and one-table design patterns dramatically easier while still providing easy access to the full DynamoDB API.

OneTable is used by the SenseDeep Serverless Troubleshooter for all DynamoDB access. OneTable is provided open source (MIT license) from GitHub OneTable or NPM OneTable.

History and Credits

After watching the famous Rick Houilahan DynamoDB ReInvent Video, we changed how we used DynamoDB for our SenseDeep serverless troubleshooter to use one-table design patterns. …

SenseDeep has powerful Alarms, Alerts and Notifications that monitor every part of your service. SenseDeep looks deeply into your application logs and metrics to sleuth trouble. You can sleep easy, knowing that SenseDeep is watching over your site, services, Lambdas and logs 24x7 and will alert you at the first sign of trouble.

SenseDeep Alarms will detect and proactively notify you if:

  • Any service is encountering application errors.
  • Any Lambdas start throwing exceptions, timing out or enduring elevated cold starts.
  • Lambda durations have spiked.
  • Request rates have risen or fallen significantly.
  • And much more

What is unique and why should I care?

SenseDeep has powerful alarming and alerting…

What happens if you must use an Enterprise logging solution such as Splunk, due to a corporate directive, but you also want to use a faster, simpler, more effective Serverless troubleshooter for your own needs?

In the past, you were out of luck.

You could use either the enterprise logger and keep corporate happy, or you could use your Serverless troubleshooter and defy the corporate overlords.

Now, there is a better way.

The Problem

AWS CloudWatch only permits one log subscription per log group to automatically ingest log data. So if you must use that subscription to capture and forward that logging…

Michael O'Brien

Founder and CEO, SenseDeep. https://www.sensedeep.com

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store