Softwr

Cloud · head to head

Amazon MSK vs AWS Lambda

Amazon MSK logo

Amazon MSK

Cloud

Managed Apache Kafka on AWS with Standard and Express broker types

From
$0.204/hour
Free plan
No
AWS Lambda logo

AWS Lambda

Cloud

Run code without thinking about servers

From
Free
Free plan
Yes

The short version

  • AWS Lambda is a serverless compute service.
  • AWS Lambda is free; Amazon MSK starts at $0.204/mo.
  • Only Amazon MSK lists standard brokers; only AWS Lambda lists event-driven execution.
  • Where Amazon MSK falls short: brokers are billed whether or not traffic flows, so a quiet development cluster costs hundreds of dollars a month at the AWS example rate.
  • 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 Amazon MSK and AWS Lambda differ?

Amazon MSK and AWS Lambda differ on starting price ($0.204/hour against Free), pricing model and free tier (No against Yes). Only the attributes on which Amazon MSK and AWS Lambda actually diverge.

Attributes where Amazon MSK and AWS Lambda differ
AttributeAmazon MSKAWS Lambda
Starting price$0.204/hourFree
Pricing modelPer broker hour plus per GB-month storageUsage-based
Free tierNoYes
PlatformsWeb, LinuxWeb, API

Not yet recorded: category for Amazon MSK, founded for Amazon MSK.

Which features does each one have?

They share no listed features; 6 appear only for Amazon MSK and 20 only for AWS Lambda. 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 Amazon MSK

  • Standard brokers
  • Express brokers
  • MSK Connect
  • MSK Replicator
  • IAM access control
  • Tiered storage

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

What is each one used for?

Amazon MSK is most often brought in for migrating a self-managed Kafka cluster without rewriting clients; AWS Lambda for event-driven functions without managing servers. The jobs each tool is most often brought in to do.

Amazon MSK

  • Event streaming between microservices where producers and consumers already speak Kafkanot AWS Lambda
  • Feeding Amazon S3, OpenSearch or Redshift from application events with MSK Connectnot AWS Lambda
  • Migrating a self-managed Kafka cluster without rewriting clientsnot AWS Lambda
  • Cross-Region replication of topics for disaster recoverynot AWS Lambda

AWS Lambda

  • Event-driven functions without managing serversnot Amazon MSK
  • API backends behind API Gatewaynot Amazon MSK
  • Processing S3, DynamoDB, SQS and Kinesis eventsnot Amazon MSK
  • Scheduled jobs without a always-on instancenot Amazon MSK
  • Edge compute through Lambda@Edgenot Amazon MSK

Where do Amazon MSK and AWS Lambda fall short?

Amazon MSK's most cited limit: Cross-AZ replication and client traffic generate data transfer charges that are not in the broker price. AWS Lambda's: ephemeral storage beyond the included 512 MB is metered. Documented limitations, not opinions. Every one is a constraint you would hit in normal use.

Amazon MSK

  • You still choose broker counts, instance sizes and partition layout, so capacity planning and rebalancing remain your responsibility on Standard brokers
  • Brokers are billed whether or not traffic flows, so a quiet development cluster costs hundreds of dollars a month at the AWS example rate
  • The ecosystem around schema governance, managed connectors and stream processing is thinner than Confluent Cloud, so more components must be assembled
  • Cross-AZ replication and client traffic generate data transfer charges that are not in the broker price
  • Kafka version upgrades and client compatibility still require planning, and AWS lags upstream releases

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

How much do Amazon MSK and AWS Lambda cost?

Amazon MSK starts at $0.204/mo; AWS Lambda is free to use. Plan by plan below, from each vendor's own pricing page.

Amazon MSK

$0.204/hour
  • Standard broker$0.204/hour
    • kafka.m7g.large $0.204 per hour, kafka.m5.large $0.21
    • Storage $0.10 per GB-month
  • Express broker$0.408/hour
    • express.m7g.large $0.408 per hour, express.m8g.large $0.3468
    • $0.01 per GB of data written
    • Low-cost storage tier retrieval $0.0015 per GB

AWS Lambda

Free
  • Free TierFree
    • 1M free requests/month
    • 400,000 GB-seconds/month
    • Always free

Which should you pick?

Choose Amazon MSK if

  • You need standard brokers.
  • You work on Web, Linux.
  • You also want express brokers.

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.

Questions people ask

Is Amazon MSK or AWS Lambda better?
It depends on the job. Amazon MSK fits event streaming between microservices where producers and consumers already speak Kafka; AWS Lambda fits event-driven functions without managing servers. Amazon MSK starts at $0.204/hour and AWS Lambda at Free.
Which is cheaper, Amazon MSK or AWS Lambda?
AWS Lambda has a free tier; the other does not. Paid plans start at $0.204/hour for Amazon MSK and Free for AWS Lambda.
Does Amazon MSK or AWS Lambda run on more platforms?
Amazon MSK runs on Web, Linux. AWS Lambda runs on Web, API.
Can I use AWS Lambda for free?
Yes. AWS Lambda has a free tier, so you can try it without paying. Amazon MSK starts at $0.204/hour.
What is Amazon MSK best used for?
Amazon MSK is most often used for event streaming between microservices where producers and consumers already speak kafka, feeding amazon s3, opensearch or redshift from application events with msk connect, migrating a self-managed kafka cluster without rewriting clients, cross-region replication of topics for disaster recovery. Of those, event streaming between microservices where producers and consumers already speak kafka and feeding amazon s3, opensearch or redshift from application events with msk connect are not what AWS Lambda is typically brought in for.
What can Amazon MSK do that AWS Lambda cannot?
Amazon MSK covers Standard brokers, Express brokers, MSK Connect, MSK Replicator. AWS Lambda covers Function-as-a-Service, Event-driven execution, Auto-scaling, Pay-per-use.

Answered from the vendors’ own pages

Amazon MSK: How much does Amazon MSK cost?

Standard kafka.m7g.large brokers are $0.204 per hour and express.m7g.large brokers $0.408 per hour, plus storage at $0.10 per GB-month, per the AWS page.

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.

Source
Amazon MSK: What is the difference between Standard and Express brokers?

Express brokers are designed for higher throughput per broker and quicker scaling; Standard brokers give more control over configuration. Both are billed per broker hour.

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.

Source
Amazon MSK: Is MSK compatible with Apache Kafka clients?

Yes. It runs Apache Kafka, so existing producers, consumers and Kafka Connect connectors work.

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).

Source
Share

Related pages

Other head to heads