Question: Can Django use DynamoDB?

Answered by Rafal Wilinski
Last updated: October 23rd, 2026
Answer
Yes. Django applications can use DynamoDB through boto3, but DynamoDB is not a built-in Django ORM backend. Put DynamoDB access in application services or repository functions rather than assuming Django models and migrations work unchanged.
For example, keep Django's relational database for authentication, admin and other ORM-backed features, while storing an application's event or session data in DynamoDB. Your view calls a service that uses boto3 to read or write the relevant item.
import boto3 def load_order(order_id): table = boto3.resource("dynamodb", region_name="us-east-1").Table("Orders") return table.get_item(Key={"pk": f"ORDER#{order_id}"}).get("Item")
This assumes a String partition key named pk and credentials supplied through the normal AWS credential chain. The resource is local to the function; do not assume boto3 resource instances are safe to share across worker threads.
Django's transaction.atomic() does not wrap DynamoDB operations, and relational migrations do not create DynamoDB indexes. Manage the table separately and use DynamoDB transactions where needed. Third-party session packages are not proof of full ORM support.
See boto3 examples and DynamoDB transactions for implementation patterns.
Source: Django database backends.
Other Common DynamoDB FAQ (with Answers)
- Does DynamoDB support Multi-AZ?
- Can you force-delete a DynamoDB table?
- Is DynamoDB based on MongoDB?
- How to import data from S3 to DynamoDB?
- Does DynamoDB have read replicas?
- Is DynamoDB HIPAA compliant?
- Are DynamoDB table names unique?
- How do you store JSON on DynamoDB?
- Should you make a new DynamoDB client for each request?
- How do you handle empty strings in DynamoDB?
- Is DynamoDB a wide-column store?
- Can DynamoDB store images?
- Is DynamoDB OLTP or OLAP?
- What are the key differences between DynamoDB and Elasticsearch?
- Is DynamoDB a memory store?
Dynobase is a Professional GUI Client for DynamoDB
Start your 7-day free trial today
Product Features
DynamoDB Tools
- SSH GUI Client
- Chat With Cloud
- MongoDB GUI Client
- AWS Cost Monitoring
- DynamoDB Query Builder
- DynamoDB Code Examples
- DynamoDB Node.js Queries
- DynamoDB JSON Converter
- DynamoDB UUID Generator
- DynamoDB Local Admin GUI
- DynamoDB Pricing Calculator
- DynamoDB Single-Table Design
- Best DynamoDB GUI Clients
- Dynobase vs DynoTable