Can DynamoDB store images?

Yes, but only small ones. DynamoDB can store images as base64-encoded Binary (B) attributes, provided the whole item stays under the 400 KB limit. AWS recommends storing larger images in Amazon S3 and keeping just the object metadata and an S3 reference in DynamoDB, since 400 KB is too small for most media files.

How small-image storage works

Encode the image as base64 and store it in a Binary attribute. DynamoDB measures the raw byte length toward the 400 KB item cap, so a thumbnail or icon fits; a full photo usually does not.

For anything larger than 400 KB:

  1. Upload the image to Amazon S3.
  2. Store its S3 key, size, content type, and other metadata in DynamoDB.
  3. Read the metadata from DynamoDB, then fetch the object from S3.

Note that DynamoDB and S3 do not share transactions, so your app must clean up orphaned objects on failure.

What inlining costs

Take one upload a second and ten views a second, on demand in us-east-1, and run both shapes through our pricing calculator:

Per month380 KB image inline119-byte pointer
Writes$624.15$1.64
Reads (eventually consistent)$156.04$1.64
Requests total$780.19$3.29

The same traffic costs 238 times as much, and capacity rounding is doing all of it. A write unit covers 1 KB, so the image bills 380 of them where the pointer bills 1. Reads round to 4 KB, so each eventually consistent read of the image costs 47.5 read units against 0.5.

Storage compounds on top. One 380 KB upload a second adds 952 GB a month, which is $238.09 at DynamoDB's $0.25 per GB-month or $21.90 at S3 Standard's $0.023, and next month's uploads add the same again.

The pointer item those numbers describe is this, and it measures 119 bytes:

{
  "pk": "IMG#2026-07-28#a1b2c3",
  "s3Key": "uploads/2026/07/28/a1b2c3.jpg",
  "contentType": "image/jpeg",
  "bytes": 389120,
  "width": 1920,
  "height": 1080,
  "uploadedAt": 1785283200
}

Go deeper

See max item size and measure items with the item size calculator. Download DynoTable to inspect binary attributes.

Pricing sources

  • Amazon DynamoDB pricing — request-unit and storage rates, synced into the calculator from the AWS Price List API.
  • Amazon S3 pricing — S3 Standard storage, $0.023 per GB-month for the first 50 TB in us-east-1 (read from the Price List API on 2026-07-28).

References

Last verified 2026-07-13 against the official AWS documentation linked above.

Costed 2026-07-28 with our own pricing calculator over the us-east-1 rates it syncs from the AWS Price List API. Inputs: on-demand, 1 write/second, 10 eventually consistent reads/second, 380 KB against the 119-byte item above, free tier off.

Work with DynamoDB without the Console

A fast DynamoDB desktop client that runs the real SQL DynamoDB can’t — JOINs, GROUP BY, aggregates — with visual editing and an AI agent on your own Bedrock keys.

Free 30-day trial, no credit card — then the Free plan with no time limit.