InterviewStack.io LogoInterviewStack.io

Serverless and Function-as-a-Service Architecture Questions

Building on managed, event-triggered compute: functions-as-a-service, cold starts, statelessness and execution limits, event sources, and composing serverless with managed services. Covers the cost, scaling, and operational tradeoffs of serverless versus containers or VMs, and when it fits. Application architecture on ephemeral compute.

MediumTechnical
42 practiced

Your model artifact is 800MB and must be served in Lambda, but Lambda has limits on deployment package size and ephemeral /tmp storage. Propose and compare architectures to serve this model: mounting EFS, streaming from S3 into memory, using a serverless container image, or serving from a managed endpoint. For each option discuss cold-start latency, throughput, cost, and operational complexity.

MediumSystem Design
38 practiced

How would you implement canary or A/B testing for two serverless ML model versions (v1 and v2) with minimal customer impact? Describe traffic splitting, instrumentation to collect model-level metrics, statistical significance criteria for rollouts, and automated rollback triggers. Mention platform features (API Gateway weighted routing, Feature Flags) and data collection best practices.

EasyTechnical
41 practiced

Describe the lifecycle of a typical FaaS invocation: cold start, initialization, warm invocation, and teardown. For AWS Lambda specifically, explain which initialization steps run only on cold start vs each request. Discuss the implications of this lifecycle for loading ML models (large binary artifacts, frameworks like PyTorch), where to place model loading code, and how warm reuse affects latency.

HardSystem Design
34 practiced

Design an observability architecture for a serverless ML platform that provides end-to-end distributed tracing from API Gateway through FaaS to downstream stores, captures model metrics (prediction distributions, feature drift), supports anomaly detection, and limits observability cost. Specify sampling strategies, where to store traces and metrics, and how to correlate telemetry for debugging model issues.

MediumTechnical
40 practiced

You run a Flask-based PyTorch inference server on EC2. Your team wants to migrate to AWS Lambda to reduce ops. Describe detailed migration steps: packaging model and native libs, handling model size and cold-starts, replacing persistent caches, benchmarking methodology to compare latency and cost, and acceptance criteria that Lambda meets before cutover.

Unlock Full Question Bank

Get access to all 40 Serverless and Function-as-a-Service Architecture interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.