How to export an existing dynamo table schema to json?
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.
Introduction
DynamoDB does not have a separate “schema export” command because the table definition is part of the table metadata returned by DescribeTable. In practice, exporting a schema to JSON means calling describe-table, saving the response, and then optionally trimming away runtime-only fields so the result is suitable for documentation or recreation.
Core Sections
Use describe-table with the AWS CLI
The quickest export path is the AWS CLI.
That file includes a lot of useful structure, such as:
- attribute definitions
- key schema
- billing mode or throughput settings
- local and global secondary indexes
- stream settings
- encryption and point-in-time recovery details when available
It also includes metadata that is not normally part of a portable schema template, such as status and timestamps.
Trim the output if you want a reusable schema artifact
describe-table returns operational metadata as well as structural metadata. If your goal is “capture the table design in JSON so I can recreate it later,” you usually want to keep only the creation-relevant fields.
With jq, for example:
Related reading
- How to export database from Amazon RDS MySQL instance to local instance?
- How to export database from Amazon RDS MySQL instance to local instance?
- How to expose Kubernetes DNS externally
- How to expose multiple kubernetes services trough single azure load balancer?
- How to export and import a .sql file from command line with options?
- How to export SQL Server database to MySQL?
- How to extract files from a zip archive in S3
- How to fanout an AWS kinesis stream?

System Design Fundamentals
Build a strong foundation in designing scalable, reliable distributed systems.
View the courseTrack what you have practised
A free account saves your progress, solutions and study plan across every problem on Codemia.
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.