Courseiva
Cloud Technology and ServicesmediumMultiple ChoiceObjective-mapped

CLF-C02 Cloud Technology and Services Practice Question

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?

⚠ Common exam trap

Test-takers frequently confuse 'serverless' with container services like Fargate, but Lambda is the only option that natively integrates with S3 events and charges only for execution time, while Fargate still requires managing task definitions and incurs costs for running containers even when idle.

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 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.

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

    Amazon EC2 Auto Scaling is not a compute service itself but a capacity management layer that adjusts the number of EC2 instances in a group. It requires underlying instances that are billed continuously (per-second or per-hour) even when idle, and it cannot directly execute code in response to S3 object-created events without additional components like SNS or SQS and custom scripts. Its scaling triggers are typically based on metrics (e.g., CPU, memory) or scheduled times, not on per-event invocation, so it provides no pay-per-execution model and would leave servers running between events.

    When this WOULD be correct

    A team needs to run a long-lived, stateful application that processes images from S3 in batches, requires custom AMI configurations, or needs to maintain persistent connections. The application runs continuously and cannot tolerate cold starts.

  • AWS Lambda

    Why this is correct

    AWS Lambda is a serverless compute service that can be triggered directly by S3 events. It runs code only when invoked, scales automatically, and bills only for the compute time used, meeting all the stated requirements.

  • Amazon ECS with Fargate

    Why it's wrong here

    Amazon ECS with Fargate runs containers without managing servers, but it is not designed for event-driven invocation in the same way as Lambda. Typically, an intermediary service (like Lambda) would be needed to trigger a container task, and you pay for running containers even while waiting for work.

    When this WOULD be correct

    A team needs to run a long-running containerized application (e.g., a video transcoding job that may take hours) triggered by S3 events, and the code requires a specific runtime environment or dependencies that are not supported by Lambda. In that case, ECS with Fargate would be the correct choice.

  • Amazon Elastic Beanstalk

    Why it's wrong here

    Elastic Beanstalk is a PaaS service that automates deployment and scaling of applications, but it requires running environments (EC2 instances) that incur costs even when idle. It is not an event-driven compute service and does not provide pay-per-execution billing.

    When this WOULD be correct

    A team needs to deploy and manage a web application with a standard architecture (e.g., load balancer, auto-scaling EC2 instances, database). They want to focus on writing code while AWS handles capacity provisioning, load balancing, and health monitoring. Elastic Beanstalk would be the correct choice for this scenario.

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 S3 events. It runs code only when invoked, scales automatically, and bills only for the compute time used, meeting all the stated requirements.

Amazon EC2 Auto Scaling groupWrong answer — click to see why

Why this is wrong here

Amazon EC2 Auto Scaling groups manage virtual servers that run continuously, incurring costs even when idle, and require manual setup for event-driven execution. They do not natively trigger code in response to S3 events without additional services like Amazon SQS or Lambda.

★ When this WOULD be the correct answer

A team needs to run a long-lived, stateful application that processes images from S3 in batches, requires custom AMI configurations, or needs to maintain persistent connections. The application runs continuously and cannot tolerate cold starts.

Why candidates choose this

Candidates may think Auto Scaling groups are necessary for scalability, but they overlook that Lambda provides automatic scaling with zero idle cost, which is more suitable for event-driven, short-lived tasks.

Amazon ECS with FargateWrong answer — click to see why

Why this is wrong here

Amazon ECS with Fargate is a container orchestration service that runs continuously, not in response to events. It would incur costs even when idle, and requires more operational overhead than Lambda for this simple event-driven thumbnail generation task.

★ When this WOULD be the correct answer

A team needs to run a long-running containerized application (e.g., a video transcoding job that may take hours) triggered by S3 events, and the code requires a specific runtime environment or dependencies that are not supported by Lambda. In that case, ECS with Fargate would be the correct choice.

Why candidates choose this

Candidates may know that Fargate is serverless and can be triggered by S3 events, but overlook that it is designed for containerized workloads with longer execution times and higher resource needs, not for short, stateless functions like thumbnail generation.

Amazon Elastic BeanstalkWrong answer — click to see why

Why this is wrong here

Amazon Elastic Beanstalk is a PaaS service that manages the entire application lifecycle, including provisioning and scaling of underlying infrastructure. It is not designed for event-driven, short-lived compute tasks triggered by S3 events, and it would introduce unnecessary operational overhead and cost compared to a serverless function.

★ When this WOULD be the correct answer

A team needs to deploy and manage a web application with a standard architecture (e.g., load balancer, auto-scaling EC2 instances, database). They want to focus on writing code while AWS handles capacity provisioning, load balancing, and health monitoring. Elastic Beanstalk would be the correct choice for this scenario.

Why candidates choose this

Candidates may think Elastic Beanstalk can automatically scale and respond to events, but they overlook that it is designed for long-running applications, not for executing code in direct response to S3 events with minimal overhead.

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 ClassMin DurationRetrievalUse Case
S3 StandardNoneImmediateFrequently accessed data
S3 Standard-IA30 daysImmediateInfrequent access, rapid retrieval
S3 One Zone-IA30 daysImmediateNon-critical infrequent data
S3 Intelligent-TieringNoneImmediate–hoursUnknown or changing access patterns
S3 Glacier Instant90 daysMillisecondsArchive with instant retrieval
S3 Glacier Flexible90 daysMinutes–hoursArchive, flexible retrieval
S3 Glacier Deep Archive180 daysHoursLong-term compliance archive

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 →

How Courseiva writes practice questions · Editorial policy

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.