Databases · head to head
AWS CloudFormation vs DynamoDB

AWS CloudFormation
Databases
Declarative infrastructure as code for AWS, free for AWS resources
- From
- Free
- Free plan
- Yes

DynamoDB
Databases
AWS-only managed key-value and document database with fixed per-partition throughput limits and no ad hoc queries.
- From
- Free
- Free plan
- Yes
The short version
- AWS CloudFormation is free; DynamoDB starts at $0.625/mo.
- Only AWS CloudFormation lists stacks and templates; only DynamoDB lists managed and serverless.
- Where AWS CloudFormation falls short: it only manages AWS, so multi-cloud estates need Terraform or Pulumi alongside it.
How do AWS CloudFormation and DynamoDB differ?
AWS CloudFormation and DynamoDB differ on pricing model and platforms. Only the attributes on which AWS CloudFormation and DynamoDB actually diverge.
| Attribute | AWS CloudFormation | DynamoDB |
|---|---|---|
| Pricing model | No charge for AWS resource types; extensions per handler operation | Usage-based |
| Platforms | Web, Linux, macOS, Windows | AWS |
Identical on both: starting price (Free), free tier (Yes).
Not yet recorded: category for AWS CloudFormation, founded for AWS CloudFormation.
Which features does each one have?
They share no listed features; 6 appear only for AWS CloudFormation and 10 only for DynamoDB. Drawn from each product's published feature list. An absence here means we hold no record of it - not that the product lacks it.
Only in AWS CloudFormation
- Stacks and templates
- Change sets
- Drift detection
- StackSets
- Rollback
- Registry extensions
Only in DynamoDB
- Managed and serverless
- Predictable latency
- On-demand or provisioned capacity
- Global secondary indexes
- Transactions
- DynamoDB Streams
- Global tables
- Point-in-time recovery
What is each one used for?
AWS CloudFormation is most often brought in for recreating identical dev, staging and production environments on AWS. The jobs each tool is most often brought in to do.
AWS CloudFormation
- Recreating identical dev, staging and production environments on AWSnot DynamoDB
- Deploying one baseline of security resources across many accounts with StackSetsnot DynamoDB
- Serverless applications packaged with AWS SAMnot DynamoDB
- Previewing and auditing infrastructure changes through change setsnot DynamoDB
DynamoDB
- High-volume keyed workloads such as sessions, shopping carts, device state or user profiles where the access pattern is fixed and knownnot AWS CloudFormation
- Traffic that spikes unpredictably, where on-demand capacity absorbs a burst without a capacity-planning exercisenot AWS CloudFormation
- Serverless applications on Lambda, where an HTTP-based datastore avoids the connection pooling problem relational databases havenot AWS CloudFormation
- Event or telemetry ingestion where writes vastly outnumber reads and each record is retrieved by a known identifiernot AWS CloudFormation
Where do AWS CloudFormation and DynamoDB fall short?
AWS CloudFormation's most cited limit: it only manages AWS, so multi-cloud estates need Terraform or Pulumi alongside it. Documented limitations, not opinions. Every one is a constraint you would hit in normal use.
AWS CloudFormation
- It only manages AWS, so multi-cloud estates need Terraform or Pulumi alongside it
- Raw templates are verbose and hard to reuse, which is why many teams add CDK on top
- A failed update can leave a stack in a stuck state such as UPDATE_ROLLBACK_FAILED that needs manual intervention
- New AWS features sometimes arrive in CloudFormation after the console and API, so you wait or script around the gap
- Deleting a stack deletes its resources, so a mistaken delete of a stack with data needs DeletionPolicy discipline
DynamoDB
- Access patterns must be designed into the key schema before launch; a query nobody anticipated needs a new global secondary index, which is a full extra copy of the projected attributes billed as storage and as writes, or an offline migration
- Global secondary indexes are eventually consistent and cannot be read strongly, so a read-after-write against an index can legitimately miss the item that was just written, and application code must be written to tolerate that
- Per-partition throughput is capped at roughly 3,000 read and 1,000 write units, so a hot key throttles even when the table has spare capacity overall, and the only real fix is changing the key design to spread the load
- Items are limited to 400 KB and query results paginate at 1 MB, so large or list-shaped data has to be split, offloaded to S3 with a pointer, or read through pagination loops that complicate every consumer
- It runs only on AWS and the API is proprietary rather than a standard, so moving the data layer means rewriting it; ScyllaDB's Alternator is the only meaningfully compatible target and it brings a much smaller ecosystem
How much do AWS CloudFormation and DynamoDB cost?
AWS CloudFormation is free to use; DynamoDB has a free plan, with paid plans from $0.625/mo. Plan by plan below, from each vendor's own pricing page.
AWS CloudFormation
Free- AWS resource typesFree
- No additional charge for using CloudFormation with AWS resources
- You pay for the resources the stack creates
- Third-party extensionsOn request
- $0.0009 per handler operation, first 1,000 per month free
- $0.00008 per second of handler duration beyond 30 seconds
DynamoDB
Free- On-Demand CapacityOn request
- Pay-per-request pricing with automatic scaling
- Read: 0.5 RRU per 4 KB (eventually consistent), 1 RRU per 4 KB (strongly consistent), 2 RRU per 4 KB (transactional)
- Write: 1 WRU per 1 KB
- Provisioned CapacityOn request
- Fixed hourly charges based on reserved capacity
- RCU rate: $0.00013 per hour (Standard)
- WCU rate: $0.00065 per hour (Standard)
- Standard Table Class Storage$0.25/per gb/month
- $0.25 per GB/month after free tier
- First 25 GB free per month (free tier)
- Standard-Infrequent Access Table Class$0.1/per gb/month
- $0.10 per GB/month
Which should you pick?
Choose AWS CloudFormation if
- You need stacks and templates.
- You want to start without paying.
- You work on Web, Linux, macOS, Windows.
- You also want change sets.
Choose DynamoDB if
- You need managed and serverless.
- You want to start without paying.
- You work on AWS.
- You also want predictable latency.
Questions people ask
- Is AWS CloudFormation or DynamoDB better?
- It depends on the job. AWS CloudFormation fits recreating identical dev, staging and production environments on AWS; DynamoDB fits high-volume keyed workloads such as sessions, shopping carts, device state or user profiles where the access pattern is fixed and known. AWS CloudFormation starts at Free and DynamoDB at Free.
- Which is cheaper, AWS CloudFormation or DynamoDB?
- AWS CloudFormation starts at Free and DynamoDB at Free.
- Does AWS CloudFormation or DynamoDB run on more platforms?
- AWS CloudFormation runs on Web, Linux, macOS, Windows. DynamoDB runs on AWS.
- Can I use AWS CloudFormation for free?
- Both have a free tier, so you can try either at no cost before committing.
- What is AWS CloudFormation best used for?
- AWS CloudFormation is most often used for recreating identical dev, staging and production environments on aws, deploying one baseline of security resources across many accounts with stacksets, serverless applications packaged with aws sam, previewing and auditing infrastructure changes through change sets. Of those, recreating identical dev, staging and production environments on aws and deploying one baseline of security resources across many accounts with stacksets are not what DynamoDB is typically brought in for.
- What can AWS CloudFormation do that DynamoDB cannot?
- AWS CloudFormation covers Stacks and templates, Change sets, Drift detection, StackSets. DynamoDB covers Managed and serverless, Predictable latency, On-demand or provisioned capacity, Global secondary indexes.
Answered from the vendors’ own pages
AWS CloudFormation: Does CloudFormation cost money?
Not for AWS resource types. You pay for the resources it creates; third-party extensions are billed at $0.0009 per handler operation after 1,000 free.
DynamoDB: On-demand or provisioned capacity?
On-demand suits unpredictable or spiky traffic and removes capacity planning. Provisioned with autoscaling is considerably cheaper for steady high-volume workloads. Tables can be switched between them, though not arbitrarily often.
AWS CloudFormation: CloudFormation or Terraform?
CloudFormation is AWS-only with state managed by AWS; Terraform spans many providers and keeps its own state.
DynamoDB: Can I run DynamoDB outside AWS?
No. DynamoDB Local exists for development and testing only. For a production-compatible alternative elsewhere, ScyllaDB's Alternator implements the DynamoDB API, but it is a different system with a different ecosystem.
AWS CloudFormation: How does CDK relate?
CDK lets you write infrastructure in a programming language and synthesises CloudFormation templates.
DynamoDB: Can I run ad hoc queries or analytics?
Not on the table itself. Scans are slow and expensive at scale. The usual pattern is to export to S3 or stream changes out and query them in Athena, Redshift or another analytical engine.
DynamoDB: Is single-table design necessary?
It is the pattern that gets the most from DynamoDB when access patterns are well known, because it lets related items be retrieved in one query. It also makes the model harder to evolve, so many teams reasonably choose multiple simpler tables and accept extra requests.
DynamoDB: What are the real limits I should design around?
400 KB per item, 1 MB per query or scan page, 100 items per transaction, roughly 3,000 read and 1,000 write units per partition, and eventual consistency on global secondary indexes.
Related pages
More on AWS CloudFormation
Other head to heads
- AWS CloudFormation vs Terraform
- AWS CloudFormation vs Spacelift
- AWS CloudFormation vs env zero
- AWS CloudFormation vs Atlantis
- AWS CloudFormation vs LocalStack
- AWS CloudFormation vs Coder
- AWS CloudFormation vs Tilt
- AWS CloudFormation vs Harness
- AWS CloudFormation vs Argo CD
- AWS CloudFormation vs Envoy
- AWS CloudFormation vs HCP Terraform
- AWS CloudFormation vs Daytona
- AWS CloudFormation vs GitHub
- AWS CloudFormation vs SonarQube
- AWS CloudFormation vs Sublime Text
- AWS CloudFormation vs Buildkite
- AWS CloudFormation vs GitLab CI/CD
- AWS CloudFormation vs Eclipse
- AWS CloudFormation vs ScyllaDB
- AWS CloudFormation vs FaunaDB
- AWS CloudFormation vs Couchbase
- AWS CloudFormation vs MongoDB
- AWS CloudFormation vs Elasticsearch
- AWS CloudFormation vs Cassandra
- AWS CloudFormation vs Azure Cosmos DB
- AWS CloudFormation vs Firestore
- AWS CloudFormation vs DataStax
- AWS CloudFormation vs Aerospike
- AWS CloudFormation vs BigQuery
- AWS CloudFormation vs Dremio
- AWS CloudFormation vs Immuta
- AWS CloudFormation vs InfluxDB
- AWS CloudFormation vs Knack
- AWS CloudFormation vs QuestDB
- AWS CloudFormation vs MongoDB Atlas
- AWS CloudFormation vs Firebase Realtime Database
- DynamoDB vs Terraform
- DynamoDB vs Spacelift
- DynamoDB vs env zero
- DynamoDB vs Atlantis
- DynamoDB vs LocalStack
- DynamoDB vs Coder
- DynamoDB vs Tilt
- DynamoDB vs Harness
- DynamoDB vs Argo CD
- DynamoDB vs Envoy
- DynamoDB vs HCP Terraform
- DynamoDB vs Daytona
- DynamoDB vs GitHub
- DynamoDB vs SonarQube
- DynamoDB vs Sublime Text
- DynamoDB vs Buildkite
- DynamoDB vs GitLab CI/CD
- DynamoDB vs Eclipse
- DynamoDB vs ScyllaDB
- DynamoDB vs FaunaDB
- DynamoDB vs Couchbase
- DynamoDB vs MongoDB
- DynamoDB vs Elasticsearch
- DynamoDB vs Cassandra
- DynamoDB vs Azure Cosmos DB
- DynamoDB vs Firestore
- DynamoDB vs DataStax
- DynamoDB vs Aerospike
- DynamoDB vs BigQuery
- DynamoDB vs Dremio
- DynamoDB vs Immuta
- DynamoDB vs InfluxDB
- DynamoDB vs Knack
- DynamoDB vs QuestDB
- DynamoDB vs MongoDB Atlas
- DynamoDB vs Firebase Realtime Database
