How do I resolve HTTP 5xx errors in Amazon DynamoDB?

Last updated: 2021-11-17

When I work with items in an Amazon DynamoDB table, I get a HTTP 5xx error similar to the following: "Internal server error (Service: AmazonDynamoDBv2; Status Code: 500; Error Code: InternalServerError".

Resolution

A 5xx error indicates a problem that must be resolved by AWS. This might be a transient issue, such as a network outage or backend hardware failure. To mitigate 5xx errors, do the following:

  • Implement a retry strategy for requests that fail with a 5xx error code. All AWS SDKs have a built-in retry mechanism with an algorithm that uses exponential backoff. You can modify the retry parameters to suit your needs. For more information, see Error retries and exponential backoff.
  • Avoid strongly consistent reads. When there's a network delay or outage, strongly consistent reads are more likely to fail with a 500 error. For more information, see Read consistency.

If you continue to get 5xx errors, open AWS Service Health Dashboard to check if there are any operational issues with the service.


Did this article help?


Do you need billing or technical support?