Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

637
Views
DynamoDB returns `Invalid UpdateExpression: Expression size has exceeded the maximum allowed size` during update

I'm trying to update an item where I need to edit about different 150 attributes on the item and I'm getting Invalid UpdateExpression: Expression size has exceeded the maximum allowed size. I assume it's because my UpdateExpression string is very long. AWS docs say that the maximum length of an expression parameters is 4kb.

How would I go about reconciling this error? I guess I could break the request down into multiple but that seems dirty.

There are some other questions on here about the Item size limit but I haven't found anything about the UpdateExpression limit.

Solution:

I ended up limiting the request to 50 attribute updates and that along with transactWrite and ConsistentRead fixed my issue.

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

I didn't run to a very long update query for DynamoDB, but for me anything more than 50 updates, I would split it to 2 update requests!

over 4 years ago · Santiago Trujillo Report

0

You have indeed reached the limit for expression parameters.

Technically you can get around this if you construct another PutItem request which will replace the item that was there previously.

By doing any writes (including updates) you will need to wait for result to be propagated to the nodes your DynamoDB table uses (because of eventual consistency), or use strong consistent reads when you try to perform a GetItem, Query or Scan request that must return this item immediately after the write.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!