JSPM

@aws-cdk/aws-dynamodb

0.15.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 36316
  • Score
    100M100P100Q22739F
  • License Apache-2.0

CDK Constructs for AWS DynamoDB

Package Exports

  • @aws-cdk/aws-dynamodb

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@aws-cdk/aws-dynamodb) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

AWS DynamoDB Construct Library

Here is a minimal deployable DynamoDB table definition:

import dynamodb = require('@aws-cdk/aws-dynamodb');

const table = new dynamodb.Table(stack, 'Table', {
  partitionKey: { name: 'id', type: dynamodb.AttributeType.String }
});

Keys

You can either specify partitionKey and/or sortKey when you initialize the table, or call addPartitionKey and addSortKey after initialization.

Configure AutoScaling for your table

You can have DynamoDB automatically raise and lower the read and write capacities of your table by setting up autoscaling. You can use this to either keep your tables at a desired utilization level, or by scaling up and down at preconfigured times of the day:

Example of configuring autoscaling

Further reading: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/AutoScaling.html https://aws.amazon.com/blogs/database/how-to-use-aws-cloudformation-to-configure-auto-scaling-for-amazon-dynamodb-tables-and-indexes/