Aws-cdk: DynamoDb - nonKeyAttributes limit incorrect

Created on 20 May 2020  路  3Comments  路  Source: aws/aws-cdk

The limit imposed on maximum nonKeyAttributes across all secondary indexes on a DynamoDB table is incorrect. The CDK limits nonKeyAttributes to 20, but the current limit is 100. See here: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html#limits-secondary-indexes

Reproduction Steps

  1. Create a DynamoDB Table
  2. Create a secondary index
  3. Add more than 20 nonKeyAttributes to the secondary index
  4. Synthesize the stack
  5. Observe.

The CDK synth will fail, reporting a 20 nonKeyAttributes limit has been breached. But the limit should be 100 nonKeyAttributes: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html#limits-secondary-indexes

Error Log

'a maximum number of nonKeyAttributes across all of secondary indexes is 20'

Environment

  • *CLI Version : 1.36.1 *
  • *Framework Version: 1.36.1 *
  • *OS : Ubuntu *
  • *Language : Typescript *

This is :bug: Bug Report

@aws-cdaws-dynamodb bug in-progress p1

All 3 comments

Just hit this too. Thanks for submitting PR @johncrn

Thanks for reporting! It appears the limit was raised since that code was written!

Thanks for reporting! It appears the limit was raised since that code was written!

Yes, that's almost certainly correct, the old limits was committed almost 2 years back. Hard to believe the CDK has been around that long - onward and upward!

Was this page helpful?
0 / 5 - 0 ratings