Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Amazon DynamoDB :- Invalid UpdateExpression: Expression size has exceeded the maximum allowed size dynamodb

I am trying to update an item in was dynamoDB using nodes, db.updateItem(query).

I am getting the following error :

Invalid UpdateExpression: Expression size has exceeded the maximum allowed size dynamodb

On reading few posts, I realised that dynamoDB allows itemSize to be 400KB and that might be a problem here. But if that is the problem, why did it allow to insert the item in the first place.

I am not sure what exactly the issue. Any help would be appreciated.

Please let me know if I missed any required information

like image 275
user3807691 Avatar asked Sep 13 '19 07:09

user3807691


People also ask

What is the maximum item size in DynamoDB?

Item size. The maximum item size in DynamoDB is 400 KB, which includes both attribute name binary length (UTF-8 length) and attribute value lengths (again binary length). The attribute name counts towards the size limit.

What is Updateexpression?

An update expression specifies how UpdateItem will modify the attributes of an item—for example, setting a scalar value or removing elements from a list or a map. The following is a syntax summary for update expressions. update-expression ::= [ SET action [, action ] ... ]

How can you tell the size of a DynamoDB table?

The AWS Command "describe-table" will give you metadata for the given table. "TableSizeBytes": 0, Which will give you "The total size of the specified table, in bytes. DynamoDB updates this value approximately every six hours.


1 Answers

You are probably hitting Expression Parameters limits. Please refer to:

https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html#limits-expression-parameters

like image 149
sigmus Avatar answered Oct 18 '22 09:10

sigmus