InternalServerError (HTTP 500)
TL;DR — DynamoDB could not process the request; the fault is on the service side and retrying is the documented response — AWS states these errors are expected during the lifetime of a table and failed requests can be retried immediately. The one subtlety: a 500 on a write is ambiguous (it may have succeeded or failed), so read the item back or use an idempotent pattern before blindly re-applying it.
What it means
InternalServerError: The server encountered an internal error trying to
fulfill the request.Unlike the 400-series errors on this hub, a 5xx doesn't mean your request was wrong — it means DynamoDB hit an internal fault handling it. The related ServiceUnavailable (HTTP 503) signals a temporary availability issue and is likewise retryable. The AWS SDKs already retry both automatically with exponential backoff, so you'll typically only see a 500 surface after the SDK's retries were exhausted.
Why it happens
- Transient service-side faults — AWS documents that occasional internal errors are expected during a table's lifetime; they're not caused by your request shape.
- A genuine service event — if 5xx responses persist across retries, check the AWS Health Dashboard for an operational issue in your Region.
How to fix it
- Retry with exponential backoff — or simply let the SDK do it; every AWS SDK retries 5xx responses automatically. Only after persistent failure should you treat it as an incident.
- Handle write ambiguity — a 500 on
PutItem/UpdateItem/DeleteItemmay have been applied. The documented options:read the item's state before retrying, and/or
guard the retry with a condition expression so it stays correct whether or not the first attempt landed, e.g. a version check:
ConditionExpression: 'version = :expected', ExpressionAttributeValues: {':expected': {'N': '7'}}use
TransactWriteItemswith aClientRequestTokenwhen idempotency is a hard requirement — duplicate attempts within the token window count once.
- A 500 on
TransactWriteItemsis safe to retry as-is — the transaction either committed or it didn't; the token deduplicates. - Escalate only when it persists — sustained 5xx across minutes is a service issue: check the health dashboard and open a support case with the
RequestIdfrom the failing responses.
After an ambiguous write, look at what's actually stored before re-running your job — the DynoTable desktop app shows the live item state at a glance, and the DynamoDB pricing calculator helps size the retry traffic if you're re-driving a batch.
Related errors
- ThrottlingException — the retryable 400 that looks similar but has a capacity cause.
- TransactionInProgressException — retry timing on transactions.
- Learn: DynamoDB consistency
References
- Error handling with DynamoDB — Amazon DynamoDB Developer Guide
- TransactWriteItems (ClientRequestToken idempotency) — Amazon DynamoDB API Reference
- Query (InternalServerError, HTTP 500) — Amazon DynamoDB API Reference
Last verified 2026-07-13 against the official AWS documentation linked above.