Lambda or Cloud Run for cost?
Cloud Run is generally cheaper for sustained loads above one request per second per instance because it bills concurrency rather than per invocation. Lambda is generally cheaper for very bursty, very small functions. The break even varies; test both for the workload.
Should I use Graviton or Arm?
Yes for most workloads. The 20 percent cost reduction is real and the migration is small for stateless code.
Are step functions worth it?
Yes for orchestrated workflows. They cost more per state transition than a single Lambda but they cap runaway retries and they make the cost auditable.
How do I handle cold start cost?
For user facing endpoints with visible latency impact, provision concurrency only for the top one or two functions. For everything else accept the cold start. Pre warming with a scheduled invocation rarely beats provisioned concurrency on cost.
Should I use Spot or preemptible for serverless?
Not directly, since the platform abstracts the underlying compute. The equivalent is moving cron and batch work to lower priced regions or to a container on Spot if the SLO allows.
How do I detect orphaned functions?
Scan for functions with zero invocations in the last 30 days, then for functions with no Terraform reference, then for functions whose owner left the company. All three should be removed.
How do I model fargate or Cloud Run jobs?
Treat them as a sibling category. The cost model is closer to Kubernetes (vCPU and memory hours) than to Lambda (GB seconds). The chargeback method is the same: per request and per outcome.