Skip to content
This repository has been archived by the owner on Jun 23, 2021. It is now read-only.

DynamoDB

James Hood edited this page Oct 14, 2019 · 4 revisions

This application uses Amazon DynamoDB as the backend database supporting the REST API. DynamoDB is a great choice for serverless APIs, because it is feature-rich and delivers single-digit millisecond performance at any scale. The DynamoDB Developer Guide already includes an extensive best practices section, so this page will focus on specific best practices used by this application.

Configure auto-scaling

While DynamoDB does allow manually passing provisioned throughput values, it is much preferred to setup autoscaling to scale up read/write throughput as traffic increases to maintain availability and scale down read/write throughput as traffic decreases to reduce cost. The simplest auto-scaling solution for DynamoDB is to enable on-demand billing mode. To learn more about DynamoDB read/write capacity options, see the DynamoDB Developer Guide.

Examples in this project:

  1. Setting on-demand billing mode

Enable encryption at rest

DynamoDB's encryption at rest is a simple configuration option that allows you to build security-sensitive applications that meet strict encryption compliance and regulatory requirements. To learn more about DynamoDB encryption at rest, see the DynamoDB Developer Guide.

Examples in this project:

  1. Setting encryption at rest

Enable point-in-time recovery (PITR)

Point-in-time recovery helps protect your DynamoDB tables from accidental write or delete operations, allowing you to restore a table to any point in time during the last 35 days. To learn more about DynamoDB point-in-time recovery, see the DynamoDB Developer Guide.

Examples in this project:

  1. Enabling point-in-time recovery

Enable DynamoDB streams for async processing

DynamoDB streams allow you to asynchronously process table updates. This can be useful for many operations, for example, analytics data processing. To learn more about DynamoDB streams, see the DynamoDB Developer Guide.

Examples in this project:

  1. Enabling streams