DVA-C02 Development with AWS Services Practice Question
A company is developing a serverless application using AWS Lambda and API Gateway. The application needs to process user uploads to Amazon S3. The Lambda function must be invoked asynchronously after an object is uploaded to an S3 bucket. Which configuration should the developer use to invoke the Lambda function?
⚠ Common exam trap
The trap here is that candidates may overcomplicate the solution by introducing unnecessary intermediary services (like SQS or API Gateway) when the direct S3-to-Lambda trigger is the simplest and most appropriate asynchronous invocation method.
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
✓
Configure the S3 bucket to send events to Lambda by adding a Lambda trigger in the S3 bucket properties.
S3 can directly invoke Lambda asynchronously via a bucket notification configuration. When an object is uploaded, S3 publishes an event to the Lambda service, which then executes the function without requiring any intermediary services. This is the simplest and most direct way to trigger a Lambda function from an S3 event.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Configure the S3 bucket to send events to Lambda by adding a Lambda trigger in the S3 bucket properties.
Why this is correct
This is the most direct and efficient method. Amazon S3 natively supports event notifications, allowing you to configure a bucket to send events, such as s3:ObjectCreated:*, directly to an AWS Lambda function. When an object is uploaded, S3 asynchronously invokes the specified Lambda function, passing the event details as payload, which simplifies the architecture and minimizes latency. This setup requires granting S3 permissions to invoke the Lambda function.
- ✗
Configure the S3 bucket to send events to an Amazon SQS queue and have Lambda poll the queue.
Why it's wrong here
While technically possible, configuring S3 to send events to an SQS queue and then having Lambda poll that queue introduces unnecessary architectural complexity and latency. S3 can directly invoke Lambda, making the SQS queue an intermediary that adds overhead for message delivery, queue management, and the Lambda polling mechanism, which is less efficient than a direct push model for this specific use case. This pattern is typically used when Lambda needs to process messages in batches or requires a robust dead-letter queue for processing failures.
- ✗
Configure the S3 bucket to send events to Amazon CloudWatch Events and have CloudWatch invoke Lambda.
Why it's wrong here
Amazon CloudWatch Events (now Amazon EventBridge) is designed for routing events from various AWS services, custom applications, or scheduled intervals to targets like Lambda. However, S3 object creation events are not directly published to CloudWatch Events in a way that allows a simple rule to capture them for Lambda invocation. While CloudTrail can log S3 API calls which CloudWatch Events can then process, this adds significant indirection and cost compared to S3's native event notification feature.
- ✗
Configure the S3 bucket to send events to an Amazon API Gateway endpoint that triggers the Lambda function.
Why it's wrong here
Using Amazon API Gateway as an intermediary for S3 events to trigger Lambda is entirely inappropriate and adds substantial, unnecessary overhead. API Gateway is primarily designed to expose HTTP/HTTPS endpoints for client applications to invoke backend services, not to process internal AWS service-to-service event notifications. S3's native event notification system is a direct, internal mechanism that bypasses the need for an external HTTP endpoint, making API Gateway an irrelevant and inefficient component for this integration.
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 DVA-C02 question from scratch — 724 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 →
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.