Courseiva
Cloud Technology and ServicesmediumMultiple ChoiceObjective-mapped

AWS Lambda for Asynchronous Background Processing

A company runs a web application that allows users to upload images. After each upload, the application must perform several background processing tasks (e.g., resizing, generating thumbnails) that take up to 30 seconds each. Users should receive an immediate response and the processing should continue asynchronously. The company wants a solution that scales automatically with the number of uploads and requires no server management. Which AWS service should the company use to run these background processing tasks?

Quick Answer

AWS Lambda is the correct choice because it provides a serverless compute service perfectly suited for asynchronous background processing tasks like image resizing and thumbnail generation after uploads. The key technical concept here is event-driven architecture: when a user uploads an image to Amazon S3, that event can automatically trigger a Lambda function to run the background processing, while the frontend immediately returns a response to the user, achieving full decoupling. On the AWS Certified Cloud Practitioner CLF-C02 exam, this scenario tests your understanding of serverless compute and event-driven integration, often appearing as a comparison against EC2 (which requires server management) or AWS Batch (better for longer, batch-oriented jobs). A common trap is choosing EC2 because it can run custom code, but Lambda’s automatic scaling and zero server management make it the clear winner for short-lived, event-triggered tasks. Memory tip: think “Lambda for light, event-driven lifting” — if the task fits within 15 minutes and responds to an event, Lambda is the serverless answer.

⚠ Common exam trap

Test-takers frequently choose Amazon ECS with AWS Fargate because they think containerization is required for complex processing, but Lambda is simpler, cheaper, and more appropriate for short-lived, event-driven tasks that fit within its execution limits.

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 executes code in response to events, such as an image upload to Amazon S3. It scales automatically with the number of uploads, requires no server management, and can run background tasks like resizing and thumbnail generation within its 15-minute maximum execution time, easily accommodating the 30-second processing requirement. Users receive an immediate response because the upload triggers Lambda asynchronously, decoupling the frontend from the processing.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • AWS Lambda

    Why this is correct

    Correct. AWS Lambda is a serverless compute service that runs code in response to events like an S3 upload. It scales automatically, requires no server management, and supports execution times up to 15 minutes, easily covering the 30-second tasks.

  • Amazon EC2 with Auto Scaling

    Why it's wrong here

    Amazon EC2 with Auto Scaling still requires provisioning and managing server instances, including patching and capacity planning, which violates the requirement for no server management. The correct service, such as AWS Lambda, executes code in response to events without any underlying infrastructure to maintain. This option is tempting because Auto Scaling does adjust capacity automatically, making it a suitable choice for background processing when the workload is predictable and long-running tasks exceed Lambda's 15-minute timeout limit.

    When this WOULD be correct

    A company needs to run a legacy application that requires a specific operating system version or persistent server state, and must handle variable traffic with automatic scaling, but server management is acceptable or already handled by the team.

  • Amazon ECS with AWS Fargate

    Why it's wrong here

    Incorrect. Amazon ECS with Fargate is a container orchestration service. It can run background tasks, but it requires creating Docker images, defining task definitions, and managing clusters. This adds unnecessary overhead compared to Lambda for short, event-driven processing.

    When this WOULD be correct

    If the background processing tasks required longer execution times (e.g., over 15 minutes), needed specific container dependencies, or required persistent storage or state, then ECS with Fargate would be the correct choice for running containerized applications without server management.

  • AWS Batch

    Why it's wrong here

    Incorrect. AWS Batch is designed for batch computing jobs that often run on a schedule or in large volumes. It requires defining job definitions and compute environments. While it could process images, it is not the simplest or most event-driven solution for this use case.

    When this WOULD be correct

    A company needs to run a large-scale, compute-intensive batch job (e.g., video transcoding, financial risk simulation) that may run for hours, with dependencies and retries. The job must be orchestrated across multiple instances and scale to thousands of tasks, but does not require immediate user response.

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

Correct. AWS Lambda is a serverless compute service that runs code in response to events like an S3 upload. It scales automatically, requires no server management, and supports execution times up to 15 minutes, easily covering the 30-second tasks.

Amazon EC2 with Auto ScalingWrong answer — click to see why

Why this is wrong here

Amazon EC2 with Auto Scaling requires managing server instances, patching, and scaling policies, which violates the 'no server management' requirement. It also does not provide the immediate, asynchronous response needed for the background tasks.

★ When this WOULD be the correct answer

A company needs to run a legacy application that requires a specific operating system version or persistent server state, and must handle variable traffic with automatic scaling, but server management is acceptable or already handled by the team.

Why candidates choose this

Candidates may think Auto Scaling can handle the background tasks automatically, but they overlook the server management overhead and the need for an event-driven, serverless solution for short-lived tasks.

Amazon ECS with AWS FargateWrong answer — click to see why

Why this is wrong here

AWS Fargate requires managing containers and tasks, which adds complexity and overhead compared to Lambda's simpler event-driven model. For short-lived, asynchronous tasks triggered by uploads, Lambda's stateless execution and automatic scaling are more appropriate.

★ When this WOULD be the correct answer

If the background processing tasks required longer execution times (e.g., over 15 minutes), needed specific container dependencies, or required persistent storage or state, then ECS with Fargate would be the correct choice for running containerized applications without server management.

Why candidates choose this

Candidates may think Fargate is a good fit because it also offers serverless container management, but they overlook that Lambda is simpler and more cost-effective for short, event-driven tasks like image processing.

AWS BatchWrong answer — click to see why

Why this is wrong here

AWS Batch is designed for batch computing jobs that can run for hours or days, not for short-lived, event-driven tasks triggered by user uploads. It requires job queues and scheduling, adding unnecessary complexity for sub-minute processing.

★ When this WOULD be the correct answer

A company needs to run a large-scale, compute-intensive batch job (e.g., video transcoding, financial risk simulation) that may run for hours, with dependencies and retries. The job must be orchestrated across multiple instances and scale to thousands of tasks, but does not require immediate user response.

Why candidates choose this

Candidates may confuse 'background processing' with 'batch processing,' assuming AWS Batch is the natural choice for any asynchronous workload, without considering the short duration and event-driven trigger of the tasks.

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?”

Visual reference

Client Server SYN (seq=100) SYN-ACK (seq=200, ack=101) ACK (ack=201) Connection established — data transfer begins

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

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 →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

2 more ways 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 company has a mobile application that allows users to upload profile photos. When a new photo is uploaded to an Amazon S3 bucket, the application must automatically create a thumbnail version and store it in another S3 bucket. The company wants a solution that runs only when needed, scales automatically, and requires no management of underlying servers. Which AWS service should the company use to meet these requirements?

medium
  • A.AWS Lambda
  • B.AWS Batch
  • C.Amazon EC2
  • D.Amazon ECS with EC2 launch type

Why A: AWS Lambda is the correct choice because it is a serverless compute service that runs code in response to events, such as an S3 PUT object event. It automatically scales from zero to thousands of concurrent executions based on the number of incoming uploads, and requires no server management, perfectly meeting the requirement for an on-demand, auto-scaling thumbnail generation solution.

Variation 2. Which AWS compute service allows developers to run code in response to HTTP requests without managing servers, using a simple programming model based on functions?

easy
  • A.Amazon EC2
  • B.AWS Lambda
  • C.Amazon ECS
  • D.AWS Fargate

Why B: AWS Lambda is the correct answer because it is a serverless compute service that executes code in response to events such as HTTP requests via Amazon API Gateway. Developers upload functions and Lambda automatically scales and manages the underlying infrastructure, aligning with the question's requirement of running code without managing servers using a function-based model.

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.