1

I have been using DynamoDB Local (currently 1.21.0) for testing my Java application using the v2 Enhanced Client for a long time, and I have used both GSIs and LSIs successfully. However, I am now trying to create a new table with 12 GSIs and no LSIs, which is within the default AWS quota of 20 per table. Attempting the CreateTable operation results in the error

No more than 20 attributes per table can be projected into Local Secondary Indices (Service: DynamoDb, Status Code: 400, Request ID: b08b6891-ffe6-4576-a080-fddb55c9880a)

I am projecting 10 or fewer attributes into each of these GSIs, and the table object has 19 attributes including derived index attributes.

Why is DynamoDB Local returning an error about "too many attributes in LSIs" when I'm not storing that many attributes in the first place and I'm not using LSIs at all? How can I get this table working?

1 Answer 1

2

If you're getting an exception then I suggest that you just use ALL projection type for your testing.

DynamoDB has a limit of 100 attributes projected per table, 12 * 20 = 240 which exceeds the projection limit.

https://aws.amazon.com/about-aws/whats-new/2018/12/amazon-dynamodb-increases-the-number-of-global-secondary-indexes-and-projected-index-attributes-you-can-create-per-table/

As for the vague/wrong exception, I'll bring that to the attention of the team.

Sign up to request clarification or add additional context in comments.

1 Comment

I suspect that the ControlPlaneFunction may still be overcounting attributes (counting key attributes double?), but this got me at least unstuck.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.