Based on data distribution, how do you decide whether to use the average or another statistic? Also, explain the Lambda architecture and how you would handle timeouts in AWS Lambda.
💡 Model Answer
When the data distribution is symmetric and free of outliers, the mean is a good measure of central tendency. If the distribution is skewed or contains extreme values, the median or mode may better represent the typical value. I inspect histograms, box plots, and calculate skewness/kurtosis to decide. For the Lambda architecture, the batch layer processes all historical data and stores it in a durable store (e.g., HDFS or S3). The speed layer handles real‑time data, computing incremental updates and pushing them to a serving layer, which provides low‑latency queries. To handle Lambda timeouts, I first increase the timeout setting if the workload can finish within the new limit. I also profile the function to identify bottlenecks, move heavy processing to Step Functions or ECS, and use asynchronous invocation for long‑running tasks. Adding retries, exponential back‑off, and monitoring with CloudWatch and X‑Ray helps prevent and diagnose timeouts.
This answer was generated by AI for study purposes. Use it as a starting point — personalize it with your own experience.
🎤 Get questions like this answered in real-time
Assisting AI listens to your interview, captures questions live, and gives you instant AI-powered answers on a discreet on-screen overlay.
Get Assisting AI — Starts at ₹500