Courseiva
Development with AWS ServiceseasyMultiple ChoiceObjective-mapped

DVA-C02 Development with AWS Services Practice Question

A developer is building a serverless application using AWS Lambda that processes files uploaded to an S3 bucket. The function needs to read the file content and store metadata in DynamoDB. Which AWS service should be used to trigger the Lambda function when a new object is created in S3?

⚠ Common exam trap

The trap here is that candidates may overcomplicate the solution by choosing SQS or SNS, thinking they need a decoupling layer, but the question asks for the service that directly triggers the Lambda when an object is created — which is S3 Event Notifications, not a message broker.

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

Amazon S3 Event Notifications

Amazon S3 Event Notifications (Option D) are the native mechanism for S3 to publish events (e.g., s3:ObjectCreated:*) directly to AWS Lambda, SQS, or SNS when an object is created. This is the simplest and most direct way to trigger a Lambda function for file processing without needing additional services.

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 CloudWatch Events

    Why it's wrong here

    Amazon CloudWatch Events primarily focuses on reacting to operational changes, scheduled events (like cron jobs), or events published by other AWS services, but it does not natively provide a direct event source for S3 object creation. While CloudWatch can monitor S3 API calls via CloudTrail logs, configuring it to trigger Lambda directly from an S3 object creation event is not its intended or most efficient use case. S3 object creation events are specifically handled by S3's own notification system.

  • Amazon SQS

    Why it's wrong here

    Amazon SQS (Simple Queue Service) functions as a highly scalable message queuing service, designed to decouple microservices. While S3 can be configured to send object creation notifications to an SQS queue, SQS itself does not directly invoke a Lambda function upon receiving a message. For Lambda to process messages from SQS, it must be configured as an event source mapping, where Lambda polls the queue for new messages, which introduces an additional layer of indirection compared to a direct S3-to-Lambda trigger.

  • Amazon SNS

    Why it's wrong here

    Amazon SNS operates as a pub/sub messaging service that requires an explicit subscription to deliver notifications, whereas S3 event notifications can trigger Lambda directly via an asynchronous invocation. This option is tempting because SNS is frequently used to fan out messages to multiple subscribers; it would be the correct choice if you needed to notify several different microservices or email addresses simultaneously upon a file upload.

  • Amazon S3 Event Notifications

    Why this is correct

    Amazon S3 Event Notifications provide a native, direct, and highly efficient mechanism for triggering AWS Lambda functions in response to specific object-level events, such as object creation, deletion, or restoration. When configured, S3 directly invokes the specified Lambda function asynchronously, passing event details like the bucket name, object key, and event time. This direct integration eliminates the need for intermediary services, making it the most straightforward and performant solution for reacting to S3 object changes.

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

This DVA-C02 question is part of Courseiva's 724-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. 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 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.