Cloud · head to head
AWS Lambda vs DynamoDB

AWS Lambda
Cloud
Run code without thinking about servers
- 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 Lambda is a serverless compute service.
- AWS Lambda is free; DynamoDB starts at $0.625/mo.
- Only AWS Lambda lists event-driven execution; only DynamoDB lists managed and serverless.
- Where AWS Lambda falls short: provisioned concurrency, used to avoid cold starts, is charged separately at $0.0000041667 per GB-second whether or not the function runs.
How do AWS Lambda and DynamoDB differ?
AWS Lambda and DynamoDB differ on platforms (Web, API against AWS), category (Cloud against Databases) and year founded (2014 against 2006). Only the attributes on which AWS Lambda and DynamoDB actually diverge.
| Attribute | AWS Lambda | DynamoDB |
|---|---|---|
| Platforms | Web, API | AWS |
| Category | Cloud | Databases |
| Founded | 2014 | 2006 |
Identical on both: starting price (Free), pricing model (Usage-based), free tier (Yes).
Which features does each one have?
They share no listed features; 20 appear only for AWS Lambda 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 Lambda
- Function-as-a-Service
- Event-driven execution
- Auto-scaling
- Pay-per-use
- Multiple languages
- Concurrency limits
- Dead Letter Queues
- Environment variables
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 Lambda is most often brought in for event-driven functions without managing servers. The jobs each tool is most often brought in to do.
AWS Lambda
- Event-driven functions without managing serversnot DynamoDB
- API backends behind API Gatewaynot DynamoDB
- Processing S3, DynamoDB, SQS and Kinesis eventsnot DynamoDB
- Scheduled jobs without a always-on instancenot DynamoDB
- Edge compute through Lambda@Edgenot 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 Lambda
- Traffic that spikes unpredictably, where on-demand capacity absorbs a burst without a capacity-planning exercisenot AWS Lambda
- Serverless applications on Lambda, where an HTTP-based datastore avoids the connection pooling problem relational databases havenot AWS Lambda
- Event or telemetry ingestion where writes vastly outnumber reads and each record is retrieved by a known identifiernot AWS Lambda
Where do AWS Lambda and DynamoDB fall short?
AWS Lambda's most cited limit: ephemeral storage beyond the included 512 MB is metered. Documented limitations, not opinions. Every one is a constraint you would hit in normal use.
AWS Lambda
- Billed on two axes at once, $0.20 per million requests plus $0.0000166667 per GB-second of duration, so memory settings change the bill as much as traffic does
- Provisioned concurrency, used to avoid cold starts, is charged separately at $0.0000041667 per GB-second whether or not the function runs
- Ephemeral storage beyond the included 512 MB is metered
- Lambda@Edge costs $0.60 per million requests, three times the standard request rate
- VPC use and cross-region data transfer carry EC2 charges on top
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 Lambda and DynamoDB cost?
AWS Lambda 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 Lambda
Free- Free TierFree
- 1M free requests/month
- 400,000 GB-seconds/month
- Always free
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 Lambda if
- You need function-as-a-service.
- You want to start without paying.
- You work on Web, API.
- You also want event-driven execution.
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 Lambda or DynamoDB better?
- It depends on the job. AWS Lambda fits event-driven functions without managing servers; 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 Lambda starts at Free and DynamoDB at Free.
- Which is cheaper, AWS Lambda or DynamoDB?
- AWS Lambda starts at Free and DynamoDB at Free.
- Does AWS Lambda or DynamoDB run on more platforms?
- AWS Lambda runs on Web, API. DynamoDB runs on AWS.
- Can I use AWS Lambda for free?
- Both have a free tier, so you can try either at no cost before committing.
- What is AWS Lambda best used for?
- AWS Lambda is most often used for event-driven functions without managing servers, api backends behind api gateway, processing s3, dynamodb, sqs and kinesis events, scheduled jobs without a always-on instance. Of those, event-driven functions without managing servers and api backends behind api gateway are not what DynamoDB is typically brought in for.
- What can AWS Lambda do that DynamoDB cannot?
- AWS Lambda covers Function-as-a-Service, Event-driven execution, Auto-scaling, Pay-per-use. DynamoDB covers Managed and serverless, Predictable latency, On-demand or provisioned capacity, Global secondary indexes.
Answered from the vendors’ own pages
AWS Lambda: Is there a free tier for AWS Lambda?
Yes. AWS Lambda offers a free tier including 1 million requests per month, 400,000 GB-seconds per month, and 100 GB monthly response streaming.
SourceDynamoDB: 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 Lambda: How is AWS Lambda charged?
Lambda charges $0.20 per million requests. Duration charges are $0.0000166667 per GB-second for x86 (up to 6 billion GB-seconds/month in US East Ohio with tiered pricing). Ephemeral storage over the included 512 MB costs $0.0000000309 per GB-second. Provisioned Concurrency costs $0.0000041667 per GB-second with a 5-minute minimum.
SourceDynamoDB: 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 Lambda: What are Lambda Durable Functions pricing?
Lambda Durable Functions include operations at $8.00 per million (start execution, steps, waits). Data written costs $0.25 per GB. Data retention is $0.15 per GB-month with configurable 1-90 day retention (default 14 days).
SourceDynamoDB: 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
Other head to heads
- AWS Lambda vs Google Cloud Run
- AWS Lambda vs Deno Deploy
- AWS Lambda vs Azure Functions
- AWS Lambda vs Serverless Framework
- AWS Lambda vs Cerebrium
- AWS Lambda vs Koyeb
- AWS Lambda vs Beam Cloud
- AWS Lambda vs Lambda
- AWS Lambda vs Porter
- AWS Lambda vs Terragrunt
- AWS Lambda vs Vultr
- AWS Lambda vs Heroku
- AWS Lambda vs OVHcloud
- AWS Lambda vs Rancher
- AWS Lambda vs HAProxy
- AWS Lambda vs IBM Cloud
- AWS Lambda vs Northflank
- AWS Lambda vs K3s
- AWS Lambda vs ScyllaDB
- AWS Lambda vs FaunaDB
- AWS Lambda vs Couchbase
- AWS Lambda vs MongoDB
- AWS Lambda vs Elasticsearch
- AWS Lambda vs Cassandra
- AWS Lambda vs Azure Cosmos DB
- AWS Lambda vs Firestore
- AWS Lambda vs DataStax
- AWS Lambda vs Aerospike
- AWS Lambda vs BigQuery
- AWS Lambda vs Neo4j
- AWS Lambda vs TiDB
- AWS Lambda vs Typesense
- AWS Lambda vs Dragonfly
- AWS Lambda vs MongoDB Atlas
- AWS Lambda vs Apache Doris
- AWS Lambda vs Apache Solr
- DynamoDB vs Google Cloud Run
- DynamoDB vs Deno Deploy
- DynamoDB vs Azure Functions
- DynamoDB vs Serverless Framework
- DynamoDB vs Cerebrium
- DynamoDB vs Koyeb
- DynamoDB vs Beam Cloud
- DynamoDB vs Lambda
- DynamoDB vs Porter
- DynamoDB vs Terragrunt
- DynamoDB vs Vultr
- DynamoDB vs Heroku
- DynamoDB vs OVHcloud
- DynamoDB vs Rancher
- DynamoDB vs HAProxy
- DynamoDB vs IBM Cloud
- DynamoDB vs Northflank
- DynamoDB vs K3s
- 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 Neo4j
- DynamoDB vs TiDB
- DynamoDB vs Typesense
- DynamoDB vs Dragonfly
- DynamoDB vs MongoDB Atlas
- DynamoDB vs Apache Doris
- DynamoDB vs Apache Solr
