aws-cdk icon indicating copy to clipboard operation
aws-cdk copied to clipboard

DynamoDb - nonKeyAttributes limit incorrect

Open johncrn opened this issue 6 years ago • 3 comments

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

johncrn avatar May 20 '20 09:05 johncrn

Just hit this too. Thanks for submitting PR @johncrn

tbartley avatar May 23 '20 02:05 tbartley

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

RomainMuller avatar May 25 '20 15:05 RomainMuller

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!

johncrn avatar May 25 '20 22:05 johncrn