Common DynamoDB Errors
Common DynamoDB Errors is a compilation of some of the most common Amazon DynamoDB errors and how to fix them.
- DynamoDB Key element does not match the schema
- DynamoDB ValidationException: Query condition missed key schema element
- DynamoDB Invalid UpdateExpression Syntax Error Token
- DynamoDB error cannot find module build/Release/DTraceProviderBindings
- sls dynamodb install not working
- DynamoDB Internal Server Error
- AWS DynamoDB errors ResourceNotFoundException
- ImportError: No module named boto (DynamoDB)
- DynamoDB Network Error: self signed certificate in chain
- ValidationException: Invalid KeyConditionExpression: Attribute name is a reserved keyword;
- ExpressionAttributeValues contains invalid value: One or more parameter values were invalid: An AttributeValue may not contain an empty string
- Error ValidationException: One or more parameter values were invalid: Type mismatch for key X expected: S actual: M
List of DynamoDB Error Codes (and What They Mean)
DynamoDB Errors can be divided into two categories: 4xx, aka you did something wrong, and 5xx aka problem is on AWS side.
Error - Status Code 5xx - AWS Problem
5xx status code indicates a problem that must be resolved by Amazon. This might be a temporary error, in which case you can retry your request until it succeeds. You can also check the AWS Service Health Dashboard and see if there are any operational issues with the DynamoDB service in your region.
Error - Status Code 4xx - Problem with your request
Unlike 5xx, 4xx status code means that your request failed validation, was not permitted or exceeded some limits. Some of the 4xx errors are thrown because of the temporary table state, e.g. it's not ready and they can be retried later. Below you can find a list of the most popular 4xx errors with a short explanation.
- AccessDeniedException - The request was signed with incorrect signature
- IncompleteSignatureException - The request was signed with incomplete signature
- LimitExceededException - You exceeded the limit of 50 tables and indexes being in created, updated or deleted
- ResourceNotFoundException - The request was made against a table that does not exists
- ValidationException - The request failed validation
DynamoDB Error Handling The Right Way
Rule of the thumb is to always wrap DynamoDB operations with "try-catch" and handle any operation failures gracefully.
Apart from that, DynamoDB SDKs deal with many errors and retries internally. You don't have to write automatic retrying because that's already handled by AWS using exponential backoff algorithm with jitter (randomized delay).
If you want to customize your SDK behavior around retries, you can do that by providing custom ClientConfiguration.
© 2020 Dynobase