AWS DVA-C02 Sample Questions with Explanations

AWS DVA-C02 sample questions with explanations, traps, topic labels, and IT Mastery route links.

These original sample questions are designed to help you check how the exam topics appear in decision-style prompts. They are not taken from the live exam.

Use these sample questions as a guided self-assessment for AWS Certified Developer - Associate (DVA-C02) topics such as Lambda behavior, event-driven design, IAM roles, DynamoDB access patterns, API integration, deployment workflows, observability, and troubleshooting. The prompts emphasize developer decisions in production AWS applications.

Where these questions fit in the DVA-C02 guide

The sample set below is part of the AWS DVA-C02 guide path:

DVA-C02 developer sample questions

Work through each prompt before opening the explanation. Strong DVA-C02 answers usually remove hard-coded secrets, design idempotent event handling, and make failures observable.


Question 1

Topic: Avoiding hard-coded credentials

A Lambda function needs to read objects from an S3 bucket. The developer currently stores an access key in an environment variable. What is the best improvement?

  • A. Encode the access key with Base64 before storing it.
  • B. Attach an IAM role to the function with least-privilege S3 permissions.
  • C. Commit the access key to the repository so deployments are repeatable.
  • D. Use the root account credentials for the function.

Best answer: B

Explanation: Lambda should use an execution role for AWS service access. The role provides temporary credentials and can be scoped to the bucket and actions the function needs.

Why the other choices are weaker:

  • A is encoding, not credential security.
  • C exposes long-term credentials in source history.
  • D violates least privilege and creates severe account risk.

What this tests: Using IAM roles for application access to AWS services.

Related topics: Lambda; IAM role; Least privilege; Credentials


Question 2

Topic: Idempotent message processing

A Lambda function processes SQS messages that create customer orders. During retries, some orders are created twice. What should the developer add?

  • A. A larger Lambda memory setting only.
  • B. A shorter queue name.
  • C. Idempotency logic that uses a unique request or message key to detect and safely ignore duplicate processing.
  • D. A second copy of the same message in the queue.

Best answer: C

Explanation: Distributed event processing can retry messages. Idempotency prevents duplicate side effects by recognizing a request that has already been processed.

Why the other choices are weaker:

  • A may affect performance but does not stop duplicate order creation.
  • B has no effect on processing semantics.
  • D increases duplicate risk.

What this tests: Designing safe retry behavior for event-driven applications.

Related topics: Idempotency; Amazon SQS; Lambda retries; Event-driven


Question 3

Topic: Troubleshooting API latency

An API Gateway endpoint invokes a Lambda function. Users report intermittent high latency, and the team needs traces that show time spent across the API and function. What should the developer enable?

  • A. Static website hosting on the S3 bucket that stores deployment artifacts.
  • B. New IAM users for every API caller.
  • C. A larger deployment package with unused libraries.
  • D. Distributed tracing with AWS X-Ray or equivalent tracing integration for the API and Lambda path.

Best answer: D

Explanation: Distributed tracing helps identify where latency occurs across service boundaries, such as API Gateway integration and Lambda execution.

Why the other choices are weaker:

  • A is unrelated to request tracing.
  • B changes identity management but not latency visibility.
  • C may make cold starts worse and does not provide traces.

What this tests: Choosing observability tools for serverless troubleshooting.

Related topics: API Gateway; AWS Lambda; Tracing; Troubleshooting

Tech Exam Lexicon and IT Mastery are independent study tools. They are not affiliated with, endorsed by, or sponsored by the exam vendor.

Revised on Sunday, May 10, 2026