ClickMasters
← Back to all FAQ cards

Cloud & DevOps

Serverless Architecture Services FAQs

What is serverless architecture?

Serverless architecture is a cloud computing model where the cloud provider (AWS, GCP, or Azure) manages the infrastructure servers, operating systems, runtime environments and the application runs in stateless, event-triggered functions that scale automatically. "Serverless" does not mean there are no servers it means the developer does not manage them. AWS Lambda (the most widely deployed serverless platform) executes code in response to events (HTTP requests, queue messages, scheduled cron, file uploads) scaling from zero to thousands of concurrent invocations in seconds without any capacity planning. The billing model: pay per invocation and per millisecond of execution time a Lambda function that runs for 100ms, 1,000 times per day costs approximately $0.002/day. A Lambda function that receives zero invocations costs $0.00/day.

What is Lambda cold start and how significant is it?

Lambda cold start occurs when AWS must initialise a new execution environment for a Lambda function that has not been invoked recently downloading the deployment package, starting the runtime, and executing the initialisation code outside the handler. Cold starts add 100ms-2s of additional latency on the first invocation after an idle period. For Node.js Lambda functions with small packages: cold starts are typically 100-300ms acceptable for non-latency-sensitive APIs and background processing. For Node.js Lambda with large packages, or Python/Java runtimes: cold starts can be 500ms-2s potentially unacceptable for user-facing APIs. Mitigations: Provisioned Concurrency (pre-warm a number of Lambda instances guaranteed sub-millisecond start), code optimisation (reduce package size, defer heavy initialization), SnapStart (Java snapshot initialised environment), and Lambda SnapStart-equivalent approaches for Node.js (tree-shaking, esbuild bundling to reduce package size). For user-facing APIs where cold start is a concern, ECS Fargate (no cold start) is often the correct choice over Lambda.

What is AWS Step Functions and when should I use it?

AWS Step Functions is a serverless workflow orchestration service that chains AWS service calls into reliable, auditable multi-step workflows. Each step in a Step Functions state machine can invoke a Lambda function, call an AWS service API directly (DynamoDB, SQS, ECS, Bedrock), wait for a human approval, retry with exponential backoff, or branch based on output. Step Functions is appropriate when: the workflow has multiple sequential or parallel steps with complex error handling (retry a specific step, catch errors from one step and route to a different path), the workflow must be durable (survive Lambda timeouts, partial failures, or restarts), or operational visibility is important (Step Functions console shows each execution visually you can see exactly where a workflow is, what input each step received, and what output it produced). Step Functions is NOT appropriate for simple single-step or two-step workflows the overhead is not justified. Use direct Lambda invocation or SQS + Lambda for simple event-driven patterns.

How do you manage costs for a Lambda-based architecture?

Lambda cost is predictable and typically very low for most B2B use cases. Key cost management levers: right-size Lambda memory (Lambda costs scale linearly with memory allocation higher memory also increases CPU proportionally, which can reduce execution time and therefore total cost; AWS Lambda Power Tuning tool automates this optimisation), enable function URLs or HTTP API instead of REST API (API Gateway HTTP API is 71% cheaper than REST API for the same workload), implement response caching (API Gateway caching cache identical API responses at the Gateway level, avoid invoking Lambda for repeated requests), monitor and optimise cold start rate (reduce Provisioned Concurrency to the minimum needed to meet latency targets Provisioned Concurrency is the most significant Lambda cost for well-tuned functions), and use Graviton2/ARM64 Lambda (20% cheaper than x86, 19% better price-performance for most workloads a simple configuration change). AWS Lambda Power Tuning (open-source tool from AWS Hero Alex Casalboni) automates memory optimisation.