DVA-C02 Development with AWS Services Practice Question
A developer is designing a serverless application that processes user-uploaded images. The images are uploaded to an S3 bucket, which triggers a Lambda function to create a thumbnail and store metadata in DynamoDB. The thumbnail creation is CPU-intensive and can take up to 10 seconds. The developer wants to minimize costs and ensure that the thumbnail is created as soon as possible. Which approach should the developer choose?
⚠ Common exam trap
Candidates often overcomplicate serverless architectures by adding SQS queues or Step Functions by default. While SQS is excellent for smoothing out traffic spikes (buffering) and Step Functions is great for complex workflows, they introduce additional latency and cost. For immediate, simple processing of individual uploads, direct S3-to-Lambda asynchronous invocation is the most optimal and cost-effective choice.
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
✓
Use S3 event notifications to directly invoke the Lambda function.
S3 event notifications directly invoke the Lambda function asynchronously, which is the simplest, fastest, and most cost-effective approach for this use case. The Lambda function's 15-minute timeout easily accommodates the 10-second thumbnail creation, and direct invocation eliminates the cost and latency of additional intermediate services like SQS or Step Functions, ensuring the thumbnail is processed as soon as the image is uploaded.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Use AWS Step Functions to orchestrate the Lambda function and DynamoDB update.
Why it's wrong here
AWS Step Functions provide robust orchestration for complex workflows involving multiple steps, error handling, and retries. However, for a straightforward serverless application where an S3 event triggers a Lambda function that subsequently updates DynamoDB, Step Functions introduce unnecessary overhead. This approach adds management complexity and additional operational costs without providing significant benefit for a simple, sequential execution flow.
- ✗
Use an ECS Fargate task to process the images, triggered by S3 events.
Why it's wrong here
Utilizing an ECS Fargate task for processing images triggered by S3 events would introduce a container orchestration layer that is generally more complex and resource-intensive than a pure serverless function. While Fargate eliminates server management, it still requires defining container images, task definitions, and managing scaling policies, which adds operational overhead. For event-driven, short-duration processing, AWS Lambda offers a more cost-effective and simpler operational model, scaling instantly without managing containers.
- ✓
Use S3 event notifications to directly invoke the Lambda function.
Why this is correct
S3 event notifications provide a native, highly efficient mechanism to directly invoke an AWS Lambda function whenever specific object events occur, such as object creation. This approach offers the simplest integration pattern, minimizing configuration and operational overhead. It ensures minimal latency between the S3 event and the Lambda execution, making it highly responsive, and is extremely cost-effective as you only pay for the Lambda compute duration and S3 storage.
- ✗
Use an SQS queue between S3 and Lambda to buffer requests.
Why it's wrong here
Introducing an SQS queue between S3 and Lambda would add an unnecessary layer of indirection and complexity for this particular use case. While SQS provides excellent buffering and decoupling capabilities, Lambda functions are designed to scale automatically and rapidly in response to event bursts, making an intermediate queue redundant for simple event processing. Furthermore, SQS would introduce additional latency and incur extra costs for message storage and processing without providing a clear benefit over direct invocation in this scenario.
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 1,135 original DVA-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 DVA-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 DVA-C02 exam.