Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

644
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda