The docs specify the limit for the Projection.NonKeyAttributes
field that's used for the Global and Local secondary indexes:
NonKeyAttributes
Represents the non-key attribute names which will be projected into the index.
For local secondary indexes, the total count of NonKeyAttributes
summed across all of the local secondary indexes, must not exceed 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.
Type: Array of strings
Array Members: Minimum number of 1 item. Maximum number of 20 items.
Length Constraints: Minimum length of 1. Maximum length of 255.
Required: No
This is not something that can be adjusted.
A Workaround may be to change your data structure - do you need flat data structures? You could also group some attributes together in a map:
{
"id": 123,
"address": {
"city": "Berlin",
"street": "Straße des 17. Juni",
"number": "17",
}
}
// instead of
{
"id": 123,
"city": "Berlin",
"street": "Straße des 17. Juni",
"number": "17"
}