CLF-C02 Cloud Technology and Services Practice Question
A company wants to build a serverless application that processes images uploaded to an Amazon S3 bucket. When a user uploads a new image, the application must automatically resize the image to multiple dimensions and store the resized versions in the same bucket under a different prefix. The company wants to minimize operational overhead and pay only for the compute time used. Which AWS service should be used to run the image processing code?
⚠ Common exam trap
Many candidates choose Amazon ECS with Fargate because they think 'serverless containers' are always the best option, but they overlook that Lambda is simpler, cheaper, and more appropriate for lightweight, event-driven tasks like image resizing, whereas Fargate adds unnecessary overhead for container orchestration.
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
AWS Lambda is the correct choice because it is a serverless compute service that runs code in response to S3 events, such as object creation. It automatically scales with the number of uploads, charges only for the compute time consumed (per 100ms increments), and requires no infrastructure management, making it ideal for event-driven image processing tasks.
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 Auto Scaling group
Why it's wrong here
An Auto Scaling group maintains a fleet of EC2 instances that must stay provisioned and incur hourly costs even when no images are being processed, so it is neither serverless nor pay-per-execution. It also has no native S3 event trigger; you would need to add Amazon EventBridge, SNS, or SQS infrastructure to invoke a script on each upload, plus scaling lag that delays processing. This makes it far more operationally complex and expensive than a Lambda function, which runs directly on the S3 PUT event.
When this WOULD be correct
A company needs to run a long-running, stateful image processing application that requires persistent storage, custom operating system configurations, or specific GPU instances for machine learning tasks, and is willing to manage the underlying infrastructure.
- ✓
AWS Lambda
Why this is correct
AWS Lambda is a serverless compute service that can be triggered directly by Amazon S3 events. It runs code only when an image is uploaded, scales automatically, and bills per millisecond of execution. This matches the requirements for minimal overhead and pay-per-use.
- ✗
Amazon ECS with Fargate
Why it's wrong here
Amazon ECS with Fargate runs containerized applications without managing servers, but it is typically used for long-running or scheduled tasks. To trigger it from S3 events, you would need an intermediary service like Amazon EventBridge or a custom polling mechanism, adding complexity and potential cost.
When this WOULD be correct
A company needs to run a long-running image processing task (e.g., >15 minutes) that requires custom libraries or specific runtime environments not supported by Lambda, and wants to avoid managing servers. ECS with Fargate would be correct for containerized workloads with flexible scaling.
- ✗
AWS Batch
Why it's wrong here
AWS Batch is a fully managed batch computing service for running large-scale batch jobs. It is not designed for real-time event-driven processing and would require orchestration to run on each S3 upload, leading to unnecessary overhead and latency.
When this WOULD be correct
A company needs to run a long-running, compute-intensive image processing job (e.g., applying complex filters to thousands of images) that can be queued and executed as a batch job. The job requires access to GPU instances and can tolerate startup delays, making AWS Batch the right choice.
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 LambdaCorrect answer▾
Why this is correct
AWS Lambda is a serverless compute service that can be triggered directly by Amazon S3 events. It runs code only when an image is uploaded, scales automatically, and bills per millisecond of execution. This matches the requirements for minimal overhead and pay-per-use.
✗Amazon EC2 Auto Scaling groupWrong answer — click to see why▾
Why this is wrong here
Amazon EC2 Auto Scaling groups require managing virtual servers, patching, and scaling policies, which increases operational overhead. The question specifies a serverless application that minimizes overhead and pays only for compute time used, which EC2 does not provide.
★ When this WOULD be the correct answer
A company needs to run a long-running, stateful image processing application that requires persistent storage, custom operating system configurations, or specific GPU instances for machine learning tasks, and is willing to manage the underlying infrastructure.
Why candidates choose this
Candidates may think EC2 Auto Scaling is suitable for any scalable workload, but they overlook the serverless requirement and the operational overhead of managing EC2 instances.
✗Amazon ECS with FargateWrong answer — click to see why▾
Why this is wrong here
Amazon ECS with Fargate is not serverless in the sense of pay-per-invocation; it requires running containers continuously or on a schedule, incurring costs even when idle, and adds operational overhead for container management compared to AWS Lambda's event-driven, zero-administration model.
★ When this WOULD be the correct answer
A company needs to run a long-running image processing task (e.g., >15 minutes) that requires custom libraries or specific runtime environments not supported by Lambda, and wants to avoid managing servers. ECS with Fargate would be correct for containerized workloads with flexible scaling.
Why candidates choose this
Candidates may think Fargate is serverless and suitable for event-driven tasks, but they overlook Lambda's simpler integration with S3 events and its true pay-per-use model for short-lived functions.
✗AWS BatchWrong answer — click to see why▾
Why this is wrong here
AWS Batch is designed for batch computing jobs that run on a managed cluster, not for event-driven, short-lived functions triggered by S3 uploads. It incurs provisioning overhead and is not ideal for lightweight image resizing tasks that require minimal compute time per invocation.
★ When this WOULD be the correct answer
A company needs to run a long-running, compute-intensive image processing job (e.g., applying complex filters to thousands of images) that can be queued and executed as a batch job. The job requires access to GPU instances and can tolerate startup delays, making AWS Batch the right choice.
Why candidates choose this
Candidates may think 'batch processing' fits image resizing because resizing multiple dimensions sounds like a batch job, but they overlook the event-driven, real-time nature of the requirement and the operational simplicity of Lambda.
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
Courseiva writes every CLF-C02 question from scratch — 988 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
Same concept, more angles
1 more way this is tested on CLF-C02
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. A development team is building a serverless application that processes image uploads to Amazon S3. The application needs to automatically generate a thumbnail version of each uploaded image and store it in a separate S3 bucket. The team wants to minimize operational overhead and only pay for the compute time used during thumbnail generation. Which AWS service should the team use to execute the thumbnail generation code in response to S3 upload events?
medium- A.Amazon EC2 Auto Scaling group
- ✓ B.AWS Lambda
- C.Amazon ECS with Fargate
- D.Amazon Elastic Beanstalk
Why B: AWS Lambda is the correct choice because it is a serverless compute service that can be triggered directly by S3 events (e.g., s3:ObjectCreated:*). This allows the thumbnail generation code to run automatically in response to each image upload, with no servers to manage and billing based only on the compute time consumed during execution.
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.