Limited-Time Offer: Enjoy 50% Savings! - Ends In 0d 00h 00m 00s Coupon code: 50OFF
Welcome to QA4Exam

Free practice questions with explanations

Amazon DVA-C02 Dumps 2026 with Free Practice Questions and Answers

14 original practice questions for the AWS Certified Developer - Associate exam, each with an answer and explanation.

Exam topics: Deployment, Development With AWS Services, Security and Troubleshooting And Optimization.

Formats: single answer, multiple answers, dropdown, order list and drag and drop. A new question is added every 15 days.

DVA-C02 Practice Set Details

Vendor
Amazon
Exam Code
DVA-C02
Questions On This Page
14
Exam Topics Covered
4 of 4
Question Types
5
Newest Question
New Question
Every 15 days
Full Question Set
600
Certifications
Amazon AssociateAWS Certified Developer Associate
14 questions

Amazon DVA-C02 Exam Questions and Answers by Topic

Development with AWS Services

32% of the exam

4 practice questions on this topicWhat this topic covers

Question 1

Added

Single Answer

An order-processing service writes orders to an Amazon DynamoDB table and then publishes an event to an Amazon SQS queue. A failure between those operations can leave an order stored without a corresponding event. The team wants consumers to receive every committed order without introducing a separate database. Which design is the best fit?

Correct answer: D

A DynamoDB transaction can atomically persist both the order and an outbox record. DynamoDB Streams then provides a change record that a consumer can process and publish to SQS, allowing retries without losing the durable intent to publish. Retrying after a process failure cannot recover an event if the process never resumes. Publishing first can create an event for an order that was not stored. Global tables replicate DynamoDB data across Regions but do not publish to SQS.

Question 2

Added

Dropdown

A Lambda function consumes messages from an Amazon SQS standard queue. A small number of messages can fail permanently, and the team wants the function to continue processing other messages while retaining failed messages for investigation. The function must avoid deleting successful messages again during a retry. Complete the configuration choices.

Choose the correct value for each blank.

Configure the event source mapping with and configure the function response type as .
Correct answer:

Configure the event source mapping with a redrive policy on the source queue and configure the function response type as ReportBatchItemFailures.

A source queue redrive policy sends messages that exceed the configured receive limit to a dead-letter queue. Enabling the ReportBatchItemFailures response type lets the Lambda function identify failed message IDs, so successfully processed messages in the batch are not unnecessarily returned for processing. A dead-letter queue setting by itself is not the source queue's redrive policy. A zero visibility timeout risks concurrent processing, and FIFO grouping does not address selective failures for a standard queue. The other response strings are not the supported setting.

Question 3

Added

Drag And Drop

A web application uses Amazon API Gateway and Lambda. The application needs one mechanism to validate incoming request structure before invoking business logic, another to keep database connections reusable across Lambda execution environments, and a third to retrieve a secret without embedding credentials in the deployment package. Match each requirement to the AWS feature that directly meets it.

Drag each item onto its matching target. On a phone: tap an item, then tap a target.

Retrieve database credentials at runtime
Reject requests that do not match a defined API schema
Reuse database connections across function invocations
AWS Secrets Manager
Initialize the database client outside the handler
API Gateway request model validation
Correct answer:
  • Reject requests that do not match a defined API schema → API Gateway request model validation
  • Reuse database connections across function invocations → Initialize the database client outside the handler
  • Retrieve database credentials at runtime → AWS Secrets Manager

API Gateway request models can validate the request body before invoking the integration. Initializing a database client outside the Lambda handler allows an execution environment to reuse the client across invocations, while still requiring the application to handle stale connections safely. Secrets Manager stores credentials separately from the deployment package and provides runtime retrieval through its APIs or supported integrations. Secrets Manager does not perform request schema validation, and an API model does not manage database clients.

Question 4

Added

Multiple Answers

A serverless application must process customer uploads in S3 and update a DynamoDB record. Uploads can arrive in bursts, and duplicate event delivery must not create duplicate business actions. The team wants independent scaling and minimal polling code. Which two design choices best meet these needs? (Choose two.)

Correct answer: A, E

S3 notifications can enqueue work in SQS, which buffers bursts and lets a Lambda event source mapping scale consumers without custom polling. S3 event notifications and SQS standard queues can deliver duplicates, so an idempotency key based on the object identity is needed to prevent repeated business effects. Synchronous client invocation couples upload completion to processing and retries can repeat work. Assuming exactly-once delivery is unsafe. A scheduled DynamoDB scan does not discover S3 objects and adds unnecessary polling.

Security

26% of the exam

4 practice questions on this topicWhat this topic covers

Question 5

Added

Single Answer

A company exposes a REST API to mobile clients. The API must authenticate users through the company's existing Amazon Cognito user pool, and authorization decisions must use the user's groups. The API invokes Lambda proxy integrations, and the team does not want to duplicate token validation in every function. Which configuration is best?

Correct answer: A

An API Gateway Cognito user pool authorizer validates the bearer token before the Lambda proxy integration and passes validated claims to the backend. The application can use the group claim to apply the required group-based authorization without reimplementing token verification in each function. API keys support usage identification and throttling, not user authentication or group authorization. Long-term IAM credentials are inappropriate for mobile clients. Trusting unverified token claims would allow forged identities.

Question 6

Added

Multiple Answers

A Lambda function in a private subnet connects to an Amazon RDS database and retrieves a database password from AWS Secrets Manager. The function has no internet route, and the organization requires least privilege and encrypted traffic. Which two changes should the team make? (Choose two.)

Correct answer: A, D

A Secrets Manager interface VPC endpoint provides private connectivity without an internet route, and its endpoint policy and security group can restrict access. The function's execution role should allow GetSecretValue only on the required secret ARN. AdministratorAccess violates least privilege. An environment variable would duplicate the sensitive value in function configuration rather than retrieve it from the managed secret. Publicly allowing database ingress is unnecessary and unsafe; security-group rules should allow the function's security group.

Question 7

Added

Single Answer

A development team needs to encrypt a sensitive configuration value used by a Lambda function. The value must be decryptable only by the function's execution role, and deployments must not expose plaintext in source control or CloudFormation parameters. The team also wants administrators to manage the value without rebuilding the application. Which approach is best?

Correct answer: D

A SecureString parameter encrypted with a customer managed KMS key keeps plaintext out of source control and deployment parameters, while allowing administrators to update the value independently of code releases. The Lambda role can be limited to the specific parameter and key permissions needed to retrieve and decrypt it. Lambda environment variables can be encrypted at rest, but placing plaintext in deployment configuration conflicts with the stated exposure constraint. Committing the decryption key defeats encryption. Broad bucket access is not least privilege.

Question 8

Added

Order List

A company is enabling AWS X-Ray tracing for a Lambda function that calls downstream AWS services. The security team requires the function to emit trace data, while retaining the existing least-privilege execution role. Arrange the configuration steps in the order they should be performed.

Drag the steps into the correct order, or use the arrows.

  1. Review the resulting service map and traces in X-Ray.
  2. Deploy the function configuration and invoke it with a representative request.
  3. Attach the AWSXRayDaemonWriteAccess policy or equivalent write permissions to the execution role.
  4. Enable active tracing on the Lambda function.
Correct answer:
  1. Attach the AWSXRayDaemonWriteAccess policy or equivalent write permissions to the execution role.
  2. Enable active tracing on the Lambda function.
  3. Deploy the function configuration and invoke it with a representative request.
  4. Review the resulting service map and traces in X-Ray.

The function needs permission to send trace data, so the execution role must first have the required X-Ray write permissions. Active tracing can then be enabled on the function. After deploying those settings, representative invocations generate data that can be inspected in X-Ray. Reviewing before invoking would provide no new trace for the test request, and enabling tracing without permissions prevents the function from publishing its trace data.

Deployment

24% of the exam

4 practice questions on this topicWhat this topic covers

Question 9

Added

Single Answer

A company builds a Lambda function as a container image and deploys it through AWS CodePipeline. The production function must not change until an integration test succeeds, and a failed test must leave production traffic on the previous version. The pipeline already builds and publishes the image to Amazon ECR. Which deployment design best meets these requirements with the least custom orchestration?

Correct answer: B

A published version is immutable, and CodeDeploy can shift an alias gradually while running validation hooks. If validation fails, CodeDeploy can stop or roll back the deployment, preserving the previous version as the production target. Updating the function directly exposes the new code before validation. A second function with an early API integration change also moves production traffic before testing. Provisioned concurrency improves startup behavior but does not provide a pre-traffic validation or rollback workflow.

Question 10

Added

Multiple Answers

A team packages a Node.js Lambda function that includes a native dependency. Local builds use a developer's laptop, but production runs on the Lambda Node.js runtime for x86_64. Intermittent deployment failures occur because developers sometimes build on ARM laptops, and the team needs reproducible artifacts without installing build tools on every workstation. They already use AWS CodeBuild and want the build to run in an environment compatible with Lambda. Which two actions should the team take? (Choose two.)

Correct answer: A, C

Native dependencies must be compiled for the operating system, runtime ABI, and processor architecture used by the function. A matching CodeBuild environment makes builds reproducible, and a Lambda base image for the target runtime and x86_64 architecture provides a compatible build environment. Lambda does not translate a binary built for another architecture. Compiling on invocation adds latency and requires build tools in the runtime environment. Changing the function architecture after an ARM build does not convert the artifact.

Question 11

Added

Order List

A team deploys a Lambda function with AWS SAM. Each release must pass a smoke test in an isolated environment before production changes, and the release pipeline must ensure the tested template and artifacts are the ones deployed to production. Arrange the steps in the order they must be performed.

Drag the steps into the correct order, or use the arrows.

  1. Deploy the same packaged template and artifacts to the production stack.
  2. Deploy the packaged application to a temporary stack.
  3. Run smoke tests against the temporary stack.
  4. Package the application and upload artifacts to the deployment bucket.
Correct answer:
  1. Deploy the packaged application to a temporary stack.
  2. Run smoke tests against the temporary stack.
  3. Package the application and upload artifacts to the deployment bucket.
  4. Deploy the same packaged template and artifacts to the production stack.

Packaging first uploads artifacts and produces a template that references those exact artifacts. Deploying that package to a temporary stack allows isolated smoke tests. Only after they pass should the identical packaged template and artifacts be deployed to production. Testing before packaging could test different code or dependencies, while rebuilding or repackaging after the test would break the requirement to promote the tested artifacts.

Question 12

Added

Single Answer

A company deploys an HTTP API with Amazon API Gateway and a Lambda backend by using AWS SAM. The team wants a disposable environment for every pull request and needs to avoid maintaining a separate hand-written infrastructure template. The application has a SAM template that declares the API and function. Which approach best satisfies the requirement?

Correct answer: B

A SAM template is a CloudFormation template, so it can be deployed as a separate stack with a unique name to create an isolated API and function environment. Deleting that stack after validation removes the temporary resources. A manually created stage still shares the production function and is not an isolated environment. Change sets preview changes to a stack; they do not clone it. Lambda versions alone do not create an isolated API or infrastructure environment.

Troubleshooting and Optimization

18% of the exam

2 practice questions on this topicWhat this topic covers

Question 13

Added

Single Answer

A Lambda function processes messages from an Amazon SQS standard queue. During a downstream outage, each invocation spends most of its time retrying the same failing database call, causing queue age to rise and Lambda concurrency to surge. The team wants to stop rapid retries, cap the number of concurrent database connections, and let messages return to the queue for later processing. Which change is best?

Correct answer: B

Reserved concurrency caps how many function executions can connect to the database at once, protecting the downstream system. Exponential backoff with jitter reduces synchronized retry pressure during an outage. When processing fails, SQS messages remain available after their visibility timeout and can be retried according to the queue's redrive configuration. Increasing concurrency worsens connection pressure. A zero visibility timeout encourages immediate duplicate processing, and acknowledging before the database operation risks message loss. More memory does not solve retry amplification.

Question 14

Added

Dropdown

A Lambda function takes several seconds to initialize because it loads a large runtime dependency on every invocation. The code is safe to reuse across invocations, and the team wants to reduce initialization work without changing the deployment artifact. Complete the code pattern.

Choose the correct value for each blank.

Place the reusable client initialization at , and invoke the request-specific operation at .
Correct answer:

Place the reusable client initialization at module scope outside the handler, and invoke the request-specific operation at inside the handler using the existing client.

Code initialized at module scope runs when the execution environment is initialized, and the resulting client can be reused by later invocations in that environment. The handler should still perform request-specific operations for each event. Recreating the client at the end of every invocation repeats initialization work. IAM policies and API Gateway mapping templates do not provide a place to reuse runtime objects, and a KMS policy or alarm action is unrelated to function initialization.

More Amazon Practice Questions

Get the Full Amazon DVA-C02 Dumps as PDF and Practice Test

14 questions are free on this page and the full set has 600. It comes as a PDF and an online practice test, with 90 days of free updates.