DAS-C01 · Question #102
An IoT company wants to release a new device that will collect data to track sleep overnight on an intelligent mattress. Sensors will send data that will be uploaded to an Amazon S3 bucket. About 2…
The correct answer is A. AWS Lambda with a Python script. The workload characteristics here favor AWS Lambda: ~2 MB of input data, ~1 GB memory requirement, and completion within a couple of minutes. AWS Lambda supports up to 10 GB of memory and a 15-minute timeout, so the job fits comfortably within Lambda's limits. Lambda charges…
Question
An IoT company wants to release a new device that will collect data to track sleep overnight on an intelligent mattress. Sensors will send data that will be uploaded to an Amazon S3 bucket. About 2 MB of data is generated each night for each bed. Data must be processed and summarized for each user, and the results need to be available as soon as possible. Part of the process consists of time windowing and other functions. Based on tests with a Python script, every run will require about 1 GB of memory and will complete within a couple of minutes. Which solution will run the script in the MOST cost-effective way?
Options
- AAWS Lambda with a Python script
- BAWS Glue with a Scala job
- CAmazon EMR with an Apache Spark script
- DAWS Glue with a PySpark job
How the community answered
(53 responses)- A83% (44)
- B9% (5)
- C6% (3)
- D2% (1)
Explanation
The workload characteristics here favor AWS Lambda: ~2 MB of input data, ~1 GB memory requirement, and completion within a couple of minutes. AWS Lambda supports up to 10 GB of memory and a 15-minute timeout, so the job fits comfortably within Lambda's limits. Lambda charges only for actual execution time (per 100ms), making it extremely cost-effective for short, infrequent per-user jobs triggered by S3 uploads. AWS Glue (options B and D) has a minimum billing unit of 1 DPU-minute and is optimized for large-scale distributed workloads - it would be overpowered and more expensive for 2 MB jobs. Amazon EMR (option C) requires cluster provisioning with significant overhead cost and startup time, making it the most expensive and least appropriate choice for this small, time-sensitive workload.
Topics
Community Discussion
No community discussion yet for this question.