Softwr

Cloud · head to head

AWS Lambda vs AWS Secrets Manager

AWS Lambda logo

AWS Lambda

Cloud

Run code without thinking about servers

From
Free
Free plan
Yes
AWS Secrets Manager logo

AWS Secrets Manager

Cloud

Managed store for database credentials and API keys with automatic rotation

From
$0.4/month
Free plan
No

The short version

  • AWS Lambda is a serverless compute service.
  • AWS Lambda is free; AWS Secrets Manager starts at $0.4/mo.
  • Only AWS Lambda lists event-driven execution; only AWS Secrets Manager lists automatic rotation.
  • 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.
  • Where AWS Secrets Manager falls short: replica secrets are billed as full secrets, which doubles or triples the cost of multi-Region storage.

How do AWS Lambda and AWS Secrets Manager differ?

AWS Lambda and AWS Secrets Manager differ on starting price (Free against $0.4/month), pricing model and free tier (Yes against No). Only the attributes on which AWS Lambda and AWS Secrets Manager actually diverge.

Attributes where AWS Lambda and AWS Secrets Manager differ
AttributeAWS LambdaAWS Secrets Manager
Starting priceFree$0.4/month
Pricing modelUsage-basedPer secret per month plus per 10,000 API calls
Free tierYesNo
PlatformsWeb, APIWeb

Not yet recorded: category for AWS Secrets Manager, founded for AWS Secrets Manager.

Which features does each one have?

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

  • Automatic rotation
  • KMS encryption
  • Cross-Region replication
  • Fine-grained access
  • Audit trail
  • Versioning

What is each one used for?

AWS Lambda is most often brought in for event-driven functions without managing servers; AWS Secrets Manager for rotating RDS or Aurora database passwords on a schedule without code changes. The jobs each tool is most often brought in to do.

AWS Lambda

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

AWS Secrets Manager

  • Rotating RDS or Aurora database passwords on a schedule without code changesnot AWS Lambda
  • Giving ECS tasks and Lambda functions credentials at runtime instead of in environment filesnot AWS Lambda
  • Replicating secrets to a second Region for disaster recoverynot AWS Lambda
  • Centralising third-party API keys with audit logs for compliancenot AWS Lambda

Where do AWS Lambda and AWS Secrets Manager fall short?

AWS Lambda's most cited limit: ephemeral storage beyond the included 512 MB is metered. AWS Secrets Manager's: replica secrets are billed as full secrets, which doubles or triples the cost of multi-Region storage. 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

AWS Secrets Manager

  • The $0.40 per secret fee applies to every secret including rarely used ones, so organisations with thousands of per-service secrets see a steady monthly charge
  • Replica secrets are billed as full secrets, which doubles or triples the cost of multi-Region storage
  • Rotation for anything other than the supported AWS databases means writing and maintaining your own Lambda function
  • It stores static secrets only; unlike HashiCorp Vault it does not issue short-lived dynamic credentials for many targets
  • It is AWS-only, so workloads on other clouds or on-premises must call AWS APIs across the network, tying their secret access to AWS availability

How much do AWS Lambda and AWS Secrets Manager cost?

AWS Lambda is free to use; AWS Secrets Manager starts at $0.4/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

AWS Secrets Manager

$0.4/month
  • Secrets$0.4/mo
    • $0.40 per secret per month, prorated hourly
    • Each replica secret is billed as a separate secret
  • API callsOn request
    • $0.05 per 10,000 API calls
    • Rotation, retrieval and management calls all count

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 AWS Secrets Manager if

  • You need automatic rotation.
  • You also want kms encryption.

Questions people ask

Is AWS Lambda or AWS Secrets Manager better?
It depends on the job. AWS Lambda fits event-driven functions without managing servers; AWS Secrets Manager fits rotating RDS or Aurora database passwords on a schedule without code changes. AWS Lambda starts at Free and AWS Secrets Manager at $0.4/month.
Which is cheaper, AWS Lambda or AWS Secrets Manager?
AWS Lambda has a free tier; the other does not. Paid plans start at Free for AWS Lambda and $0.4/month for AWS Secrets Manager.
Does AWS Lambda or AWS Secrets Manager run on more platforms?
AWS Lambda runs on Web, API. AWS Secrets Manager runs on Web.
Can I use AWS Lambda for free?
Yes. AWS Lambda has a free tier, so you can try it without paying. AWS Secrets Manager starts at $0.4/month.
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 AWS Secrets Manager is typically brought in for.
What can AWS Lambda do that AWS Secrets Manager cannot?
AWS Lambda covers Function-as-a-Service, Event-driven execution, Auto-scaling, Pay-per-use. AWS Secrets Manager covers Automatic rotation, KMS encryption, Cross-Region replication, Fine-grained access.

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.

Source
AWS Secrets Manager: How much does Secrets Manager cost?

$0.40 per secret per month and $0.05 per 10,000 API calls, per the AWS pricing page. A replica in another Region is billed as another secret.

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
AWS Secrets Manager: Is Secrets Manager cheaper than Parameter Store?

Parameter Store standard parameters carry no charge, so for static values that do not need rotation it is cheaper. Secrets Manager adds rotation and replication.

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
AWS Secrets Manager: Does it rotate secrets automatically?

Yes. It has managed rotation for supported AWS databases and uses Lambda functions for other secret types.

Share

Related pages

Other head to heads