error in lambda , no clue why

0

hi, we are geting this error in the logs and have no clue why, we have a lambda which does a scan on dynambd, the lambda seems to throw an error count at the time, there seems to be nothing in dynamdb, this is the error, can anyone tell me why this is happening? { "errorType": "ValidationException", "errorMessage": "Invalid FilterExpression: Expression size has exceeded the maximum allowed size; expression size: 4172", "code": "ValidationException", "message": "Invalid FilterExpression: Expression size has exceeded the maximum allowed size; expression size: 4172", "time": "2022-09-07T16:12:20.819Z", "requestId": "RG2TJNCJ36LIHKIHPJ8V7BQ3ARVV4KQNSO5AEMVJF66Q9ASUAAJG", "statusCode": 400, "retryable": false, "retryDelay": 6.469955607178434, "stack": [ "ValidationException: Invalid FilterExpression: Expression size has exceeded the maximum allowed size; expression size: 4172", " at Request.extractError (/var/runtime/node_modules/aws-sdk/lib/protocol/json.js:52:27)", " at Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:106:20)", " at Request.emit (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:78:10)", " at Request.emit (/var/runtime/node_modules/aws-sdk/lib/request.js:686:14)", " at Request.transition (/var/runtime/node_modules/aws-sdk/lib/request.js:22:10)", " at AcceptorStateMachine.runTo (/var/runtime/node_modules/aws-sdk/lib/state_machine.js:14:12)", " at /var/runtime/node_modules/aws-sdk/lib/state_machine.js:26:10", " at Request.<anonymous> (/var/runtime/node_modules/aws-sdk/lib/request.js:38:9)", " at Request.<anonymous> (/var/runtime/node_modules/aws-sdk/lib/request.js:688:12)", " at Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:116:18)" ] }

已提问 2 年前532 查看次数
1 回答
2

From the error message, your filter expression seems to be more than 4KB, which is the maximum allowed.

It is mentioned in the documentation - https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ServiceQuotas.html under the Expression Parameters section - "The maximum length of any expression string is 4 KB. For example, the size of the ConditionExpression a=b is 3 bytes."

profile pictureAWS
专家
已回答 2 年前
profile pictureAWS
专家
已审核 2 年前
  • i'm not sure it is that, as at the exact same time a CORS error is thrown, would the CORS error cause a limit rate?

  • From the error message, it does not look like having to do with CORS. The error is being thrown when the lambda function is trying to do a scan on DynamoDB and from the error message what I can see is that the filter expression max length is being violated.

  • I'm getting the same error when trying to update a item via the management console: Invalid ConditionExpression: Expression size has exceeded the maximum allowed size; expression size: 4255 The item has 17KB which is way lower than the 400KB limit for items in DynamoDB.

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则

相关内容