CLF-C02 Cloud Technology and Services Practice Question
A company's data analytics team needs to process log files immediately after they are uploaded to an Amazon S3 bucket. The processing logic is implemented as a custom Python script that runs for about 10 seconds per file. The team wants a fully managed solution that does not require provisioning or managing servers, automatically scales with the number of incoming log files, and executes the script only when new files are uploaded. Which AWS service should the team use to meet these requirements?
⚠ Common exam trap
Candidates often confuse 'fully managed' with services like EC2 Auto Scaling or Elastic Beanstalk, which still require server management, or think EMR is suitable for small, event-driven tasks, when in fact Lambda is the only serverless option that directly integrates with S3 events for immediate, per-file processing.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
AWS Lambda with an S3 bucket notification trigger
AWS Lambda is the correct choice because it is a fully managed, serverless compute service that can be triggered directly by S3 bucket notifications (e.g., s3:ObjectCreated:* events). The custom Python script runs within the Lambda function, which automatically scales to handle concurrent invocations for each new log file, and the 10-second execution time is well within the 15-minute maximum duration for Lambda functions. This meets all requirements without provisioning or managing servers.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Amazon EC2 with an Auto Scaling group configured to launch instances based on S3 events
Why it's wrong here
Configuring an Auto Scaling group to react to S3 events is neither direct nor efficient. Auto Scaling groups primarily scale based on metrics such as CPU utilization or on a defined schedule, so you would need to route S3 notifications through SNS/SQS and then trigger scaling — and newly launched instances can require minutes to boot and initialize before running the job. For a short, 10-second Python script, this approach introduces significant latency, requires ongoing management of AMIs, patching, and instance state, and bills for the entire time each instance runs, making it far more complex and costly than using AWS Lambda.
When this WOULD be correct
A company needs to process log files from S3 using a custom Python script that runs for 30 minutes per file and requires access to GPU resources. The processing must be fault-tolerant and handle occasional spikes in file uploads. In this case, EC2 with Auto Scaling triggered by S3 events (via SNS or SQS) would be appropriate because Lambda has a 15-minute timeout and limited runtime environments.
- ✓
AWS Lambda with an S3 bucket notification trigger
Why this is correct
Correct. AWS Lambda is a serverless compute service that runs code in response to events, such as S3 object creation. It automatically scales, requires no server management, and executes the function only when new files are uploaded, making it the best fit for this use case.
- ✗
AWS Elastic Beanstalk configured with a worker environment
Why it's wrong here
AWS Elastic Beanstalk worker environments provision and run EC2 instances continuously to poll an SQS queue, failing the requirement for a solution that executes *only* when new files are uploaded and does not require provisioning servers. While it offers managed scaling for background tasks, it isn't truly serverless. This option is tempting as it manages infrastructure and scales for asynchronous processing, making it suitable for long-running, message-driven applications requiring a persistent server environment.
When this WOULD be correct
A company needs to run a long-running background job (e.g., processing large files or complex video transcoding) that takes more than 15 minutes per task, and they want automatic scaling and decoupled processing via an SQS queue. Elastic Beanstalk worker environments are ideal for such tasks.
- ✗
Amazon EMR with a scheduled step to process new files
Why it's wrong here
Amazon EMR is designed for big data processing using frameworks like Apache Spark and Hadoop. It is overkill for a simple Python script that runs in 10 seconds and would require manual scheduling or custom logic to trigger based on S3 events, adding unnecessary cost and complexity.
When this WOULD be correct
A question requiring processing of terabytes of log files using distributed frameworks like Apache Spark or Hive, where the processing involves complex transformations, machine learning, or large-scale data analytics that cannot be handled by a single Lambda function due to time or memory limits.
Option-by-option analysis
Why each answer is right or wrong
Understanding why wrong answers are wrong — and when they would be correct — is what separates a 750 score from a 900. The CLF-C02 exam frequently reuses these exact scenarios with slightly different constraints.
✓AWS Lambda with an S3 bucket notification triggerCorrect answer▾
Why this is correct
Correct. AWS Lambda is a serverless compute service that runs code in response to events, such as S3 object creation. It automatically scales, requires no server management, and executes the function only when new files are uploaded, making it the best fit for this use case.
✗Amazon EC2 with an Auto Scaling group configured to launch instances based on S3 eventsWrong answer — click to see why▾
Why this is wrong here
Amazon EC2 with Auto Scaling requires provisioning and managing servers, which contradicts the requirement for a fully managed solution that does not require provisioning or managing servers. Additionally, it does not natively trigger based on S3 events without additional setup.
★ When this WOULD be the correct answer
A company needs to process log files from S3 using a custom Python script that runs for 30 minutes per file and requires access to GPU resources. The processing must be fault-tolerant and handle occasional spikes in file uploads. In this case, EC2 with Auto Scaling triggered by S3 events (via SNS or SQS) would be appropriate because Lambda has a 15-minute timeout and limited runtime environments.
Why candidates choose this
Candidates may think that EC2 with Auto Scaling can be triggered by S3 events and automatically scale, but they overlook the requirement for a fully managed serverless solution and the complexity of managing EC2 instances.
✗AWS Elastic Beanstalk configured with a worker environmentWrong answer — click to see why▾
Why this is wrong here
AWS Elastic Beanstalk with a worker environment requires provisioning and managing servers (EC2 instances), even though it automates some deployment and scaling tasks. It is not fully serverless and does not execute the script only when new files are uploaded without additional configuration like SQS polling.
★ When this WOULD be the correct answer
A company needs to run a long-running background job (e.g., processing large files or complex video transcoding) that takes more than 15 minutes per task, and they want automatic scaling and decoupled processing via an SQS queue. Elastic Beanstalk worker environments are ideal for such tasks.
Why candidates choose this
Candidates may think Elastic Beanstalk is fully managed and serverless, but it still runs on EC2 instances. They might also confuse worker environments with Lambda's event-driven model, overlooking the requirement for no server provisioning.
✗Amazon EMR with a scheduled step to process new filesWrong answer — click to see why▾
Why this is wrong here
Amazon EMR is designed for big data processing using frameworks like Hadoop and Spark, not for lightweight, event-driven Python scripts that run for seconds. It requires provisioning clusters and is overkill for simple log processing triggered by S3 uploads.
★ When this WOULD be the correct answer
A question requiring processing of terabytes of log files using distributed frameworks like Apache Spark or Hive, where the processing involves complex transformations, machine learning, or large-scale data analytics that cannot be handled by a single Lambda function due to time or memory limits.
Why candidates choose this
Candidates may associate EMR with log processing and big data, overlooking that the requirements specify a fully managed, serverless solution with automatic scaling for short-running scripts triggered by S3 events.
Analysis generated from the official CLF-C02blueprint and verified against question context. The “when correct” sections are what AI assistants cite when candidates ask “what’s the difference between these options?”
Quick reference
AWS S3 Storage Class Comparison
| Storage Class | Min Duration | Retrieval | Use Case |
|---|---|---|---|
| S3 Standard | None | Immediate | Frequently accessed data |
| S3 Standard-IA | 30 days | Immediate | Infrequent access, rapid retrieval |
| S3 One Zone-IA | 30 days | Immediate | Non-critical infrequent data |
| S3 Intelligent-Tiering | None | Immediate–hours | Unknown or changing access patterns |
| S3 Glacier Instant | 90 days | Milliseconds | Archive with instant retrieval |
| S3 Glacier Flexible | 90 days | Minutes–hours | Archive, flexible retrieval |
| S3 Glacier Deep Archive | 180 days | Hours | Long-term compliance archive |
Go deeper
Related to this question
About these practice questions
One of 988 original CLF-C02 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This CLF-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CLF-C02 exam.