Courseiva
Development with AWS ServicesmediumMultiple ChoiceObjective-mapped

DVA-C02 Development with AWS Services Practice Question

A developer is building a serverless application that uses Amazon S3 event notifications to trigger an AWS Lambda function for thumbnail generation. The developer wants to ensure that duplicate S3 events do not cause the same image to be processed multiple times. Which approach should the developer implement to ensure idempotent processing?

⚠ Common exam trap

Candidates often assume S3 event notifications are exactly-once, but the exam tests that they are at-least-once, requiring explicit idempotency handling via an external store like DynamoDB.

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

Store the object key and event ID in a DynamoDB table and check for duplicates before processing

Storing the S3 object key and event ID in a DynamoDB table with a TTL attribute allows the Lambda function to perform a conditional write (or check for an existing item) before processing. This ensures that even if duplicate S3 events are delivered (e.g., due to S3's at-least-once delivery guarantee), the same image is only processed once, achieving idempotency.

Answer analysis

Option-by-option breakdown

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

  • Store the object key and event ID in a DynamoDB table and check for duplicates before processing

    Why this is correct

    Amazon S3 event notifications operate on an "at least once" delivery model, meaning duplicate events can occur. By storing a unique identifier, such as a combination of the S3 object key and the event's `eventTime` or a generated `eventId`, in a DynamoDB table, the Lambda function can implement idempotency. Before processing, the function attempts a conditional write to DynamoDB; if the item already exists, it signifies a duplicate event that has been processed or is currently being handled, preventing redundant work and ensuring each object is processed exactly once.

  • Set the Lambda function's concurrency to 1 to prevent concurrent executions

    Why it's wrong here

    Setting a Lambda function's reserved concurrency to 1 ensures that only one instance of the function runs at any given time, processing events sequentially. However, this configuration does not prevent Amazon S3 from sending duplicate event notifications for the same object or action. If S3 delivers the same event multiple times, the Lambda function will still receive and process each instance, albeit one after the other, leading to duplicate processing of the underlying data.

  • Use an Amazon SQS FIFO queue as the event destination

    Why it's wrong here

    Amazon S3 event notifications are designed to integrate exclusively with standard Amazon SQS queues, not FIFO (First-In, First-Out) queues. S3's event delivery model does not inherently provide the strict ordering or exactly-once delivery semantics that FIFO queues are built to enforce. Therefore, attempting to configure an S3 event notification to send messages to an SQS FIFO queue is not a supported integration option within the AWS ecosystem, making this solution technically unfeasible.

  • Enable S3 event notification filtering based on object size

    Why it's wrong here

    S3 event notification filtering, such as by object size or prefix/suffix, allows administrators to specify which S3 object operations should trigger events, thereby reducing the overall volume of notifications. While this can be useful for targeting specific data, it does not address the problem of duplicate event delivery for objects that *do* match the specified filter criteria. If an object that meets the filter requirements triggers an event, S3 might still deliver that specific event notification multiple times, leading to redundant processing by the downstream Lambda function.

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.