Courseiva
Development with AWS ServicesmediumDrag & DropObjective-mapped

DVA-C02 Development with AWS Services Practice Question

Drag and drop the steps to create a Lambda function that processes S3 events in the correct order.

Drag steps to the numbered slots on the right, or tap a step then tap a slot.

Steps
Order
1Step 1
2Step 2
3Step 3
4Step 4
5Step 5

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

Set up permissions, then write code, then create function, then configure trigger, then test.

First set up permissions, then code, create function, configure trigger, and test.

Answer analysis

Option-by-option breakdown

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

  • Set up permissions, then write code, then create function, then configure trigger, then test.

    Why this is correct

    This is correct because permissions must be set first to allow the Lambda function to access S3 and CloudWatch, then the code is written, the function is created, the S3 trigger is configured to invoke the function on events, and finally testing validates the setup.

  • Write code, then set up permissions, then create function, then configure trigger, then test.

    Why it's wrong here

    This sequence is incorrect because the Lambda execution role, which defines the function's permissions to interact with other AWS services like S3 and CloudWatch Logs, should ideally be established *before* the code is written and certainly before the function is created. While code can be written independently, the function's ability to perform its intended actions relies on these permissions. Attempting to create and test a function without its necessary privileges will result in runtime errors, making the "write code" step less effective without the context of available permissions.

  • Set up permissions, then create function, then write code, then configure trigger, then test.

    Why it's wrong here

    This order is flawed because creating a Lambda function inherently requires the function's code and handler to be specified during its initial setup. You cannot create a functional Lambda resource as an empty shell and then subsequently "write code" as a separate, later step in the creation workflow. The deployment package containing the function's logic is a fundamental component provided at the time of function creation, not added afterwards as a primary step.

  • Set up permissions, then write code, then create function, then test, then configure trigger.

    Why it's wrong here

    This sequence is incorrect because testing a Lambda function designed to respond to an S3 trigger *before* that trigger is configured prevents end-to-end validation. While you can perform isolated tests with sample events through the console, this does not confirm the crucial integration where an actual S3 event successfully invokes the function. The "configure trigger" step establishes the event source mapping, which is essential for validating the function's behavior in its intended event-driven environment.

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 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 →

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.