An IoT company’s mattress sensors upload ~2 MB of data per mattress per night to an Amazon S3 bucket. Each mattress’s data must be processed and summarized as soon as possible. Processing requires 1 GB of memory and finishes within 30 seconds. Which solution meets these requirements most cost-effectively?
Choose an answer
Tap an option to check your answer.
Correct answer: Use AWS Lambda with a Python script.
Why this is the answer
AWS Lambda is the most cost-effective solution. Each mattress's data (2 MB) is small and needs immediate processing, which aligns perfectly with Lambda's event-driven, serverless compute model. Lambda functions can be triggered directly by S3 object creation events, process the data with 1 GB of memory within 30 seconds, and you only pay for the compute time consumed. AWS Glue with Scala or PySpark jobs, and Amazon EMR with Apache Spark, are designed for larger-scale, batch processing or long-running analytics workloads, making them overkill and significantly more expensive for processing individual 2 MB files as they arrive. These services incur costs for cluster provisioning and uptime, even for small, intermittent tasks.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed