apointoo.
HIPAA

How to Estimate Lambda and DynamoDB Monthly Cost

cmsapointoo··5 min read

Estimate Lambda and DynamoDB monthly cost by separating requests, execution duration, storage, indexes, logs, queues, API ingress, and time-limited free tiers. A serverless architecture can reduce idle compute, but it does not remove database design, authorization, backup, support, or evidence work.

Use the provider pricing pages as dated inputs. The figures and assumptions must be refreshed before deployment because rates, free tiers, regions, and service behavior can change.

Cost surface and assumptions

Record monthly requests, average and maximum execution duration, memory, provisioned concurrency, database reads, writes, item size, indexes, storage, backups, logs, queues, API requests, regions, and deploys. Model bursts and retries. A failed request can create a retry and a second database operation.

The AWS Lambda Pricing page separates request and duration charges and documents current free allocations. Use it for the runtime line, not for migration labor or compliance work.

The Amazon DynamoDB Pricing page describes on-demand requests, storage, indexes, backups, and other cost inputs. DynamoDB access patterns also shape item count and index design. A low request count can still create a larger storage or backup line.

Amazon API Gateway’s pricing page adds an ingress and free-credit dimension. Time-limited credits should be shown separately from long-term price. For GCP comparison, read Cloud Run and Firestore cost estimation.

One-time work versus recurring work

One-time work includes Lambda packaging, IAM design, event contracts, DynamoDB access patterns, indexes, tenant authorization, migration, queues, retries, backups, logs, and denial tests. A document database move is not only a change of SDK. It can change queries, reports, transactions, exports, and recovery procedures.

Recurring work includes invocations, reads, writes, storage, indexes, backups, logs, queue operations, deploys, support, access reviews, restore drills, and dependency updates. Compliance reserve, counsel, and training are separate from AWS consumption.

Line Formula Common miss
Lambda Requests + GB-seconds or duration Retries and memory setting
DynamoDB Reads, writes, storage, indexes Report and scan access patterns
API Gateway API calls and data transfer Credit expiry and traffic bursts
Logs and queues Ingestion, retention, requests Debug payloads and dead letters
Recovery Backups, restores, validation labor Cross-region copies and cleanup

Scenario table and calculation

Use this formula:

monthly estimate =
  Lambda requests + duration
  + DynamoDB requests + storage + indexes + backups
  + API Gateway requests and data transfer
  + logs + queues + monitoring + keys
  + support, restore, and compliance reserve
Scenario Workload Cost sensitivity
Low On-demand requests, small items, little storage Fixed logs, keys, and API traffic
Growth More reads, writes, indexes, and retries Access-pattern efficiency and index count
Regional Separate regional stacks or backup copies Duplicated fixed resources and transfer

Label every case “planning estimate as of 2026-08-15.” Show the value after free credits and after a retry spike. Do not use a single average item size if large exports or reports exist.

Tenant design and scan risk

DynamoDB costs and authorization are linked to access patterns. A table designed for ordinary point reads may not safely support an administrative scan or a new report. Add an explicit authorization and cost review whenever a new index, scan, export, or fan-out query is proposed.

Use tenant-scoped keys, server-owned membership, and constrained service roles. Test altered tenant values, stale jobs, broad administrative roles, and restore copies. A low bill does not compensate for a query path that returns another tenant’s data.

See tenant isolation negative tests and pooled versus silo isolation. Include their testing and evidence effort in the recurring model.

Commercial approval gate

  1. List workload and access-pattern assumptions.
  2. Calculate requests, duration, storage, indexes, logs, queues, and backups.
  3. Show current and post-credit cases.
  4. Include regional, retry, restore, and support scenarios.
  5. Review tenant authorization and scan behavior.
  6. Refresh the worksheet before commitment.

Stop when the estimate ignores retries, indexes, logs, or backup storage, or when the price is used to imply a security or compliance result. Treat provider documentation and application proof as different gates.

Frequently asked questions

Is Lambda cost always close to zero?

At low volume, request and duration charges may be modest. Memory, duration, retries, provisioned concurrency, API requests, logs, storage, and support can change the result. Use a workload-specific model.

What is the DynamoDB cost trap?

Teams often price point reads while forgetting indexes, scans, reports, storage growth, backups, and retries. Design access patterns first, then price every operation needed by the product and support workflows.

Do free tiers last forever?

Free allocations differ by service and may be time-limited or subject to conditions. Record the date, eligibility, region, and post-credit price. Never make a long-term quote depend on an unverified credit.

References

Related articles