How do I troubleshoot HTTP 4XX errors in Amazon DynamoDB?

Last updated: 2022-08-12

I want to resolve 4xx exceptions in Amazon DynamoDB.

-or-

My Amazon DynamoDB table has a high number of UserErrors.

Short description

An HTTP 4xx status code indicates that there is a problem with your request, such as an authentication failure, missing required parameters, or exceeding a table's provisioned throughput. You must fix the issue in your application before submitting the request again. For a complete list of 4xx errors, see Error messages and codes.

You can view these client-side errors for all tables and streams in the same Region and account using the Amazon CloudWatch UserErrors metric. Exceptions, such as IncompleteSignatureException, ResourceNotFoundException, and ValidationException, result in user errors. However, the UserErrors metric doesn't capture ProvisionedThroughputExceededException or ConditionalCheckFailedException. For more information, see DynamoDB metrics.

You might also get 4xx errors because of the temporary table state. In these cases, you can retry your requests later.

Resolution

Here are the applicable statistics for UserErrors:

  • Sum: the total number of user errors during the time frame
  • SampleCount: the total number of requests that resulted in user errors during the time frame

Resolve user errors on the client side:

  1. To find the root causes of user errors, note the time frame that's specified in the UserError metric. Then, check that time frame in the client's application logs.
  2. To prevent user errors, add try-catch or if-then statements to catch and respond to exceptions. For more information, see Error handling with DynamoDB.

Did this article help?


Do you need billing or technical support?