Amazon DVA-C02 Practice Exams
Last updated on Oct 21,2026- Exam Code: DVA-C02
- Exam Name: AWS Certified Developer - Associate
- Certification Provider: Amazon
- Latest update: Oct 21,2026
A company has a website that is developed in PHP and is launched using AWS Elastic Beanstalk. There is a new version of the website that needs to be deployed in the Elastic Beanstalk environment. The company cannot tolerate having the website offline if an update fails. Deployments must have minimal impact and rollback as soon as possible.
- A . All at once
- B . Rolling
- C . Snapshots
- D . Immutable
D
Explanation:
The Immutable deployment method is the best choice when a company requires minimal downtime and automatic rollback in case of a failure. Here’s why:
In Immutable deployments, a new set of instances is launched with the updated version. These instances are tested and validated before they replace the old instances. This ensures zero downtime and immediate rollback if the deployment fails.
All at once (A) causes downtime because the update replaces all instances simultaneously.
Rolling deployments (B) update a few instances at a time, but if a failure occurs midway, downtime or partial unavailability can happen.
Snapshots (C) are not a deployment strategy in Elastic Beanstalk.
Reference: Elastic Beanstalk Deployment Policies
A company built an online event platform For each event the company organizes quizzes and generates leaderboards that are based on the quiz scores. The company stores the leaderboard data in Amazon DynamoDB and retains the data for 30 days after an event is complete The company then uses a scheduled job to delete the old leaderboard data
The DynamoDB table is configured with a fixed write capacity. During the months when many events occur, the DynamoDB write API requests are throttled when the scheduled delete job runs.
A developer must create a long-term solution that deletes the old leaderboard data and optimizes write throughput
Which solution meets these requirements?
- A . Configure a TTL attribute for the leaderboard data
- B . Use DynamoDB Streams to schedule and delete the leaderboard data
- C . Use AWS Step Functions to schedule and delete the leaderboard data.
- D . Set a higher write capacity when the scheduled delete job runs
A
Explanation:
DynamoDB TTL (Time-to-Live): A native feature that automatically deletes items after a specified expiration time.
Efficiency: Eliminates the need for scheduled deletion jobs, optimizing write throughput by avoiding potential throttling conflicts.
Seamless Integration: TTL works directly within DynamoDB, requiring minimal development overhead.
Reference: DynamoDB TTL
Documentation: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/TTL.html
A company is building a serverless application that uses AWS Lambda functions. The company needs to create a set of test events to test Lambda functions in a development environment. The test events will be created once and then will be used by all the developers in an 1AM developer group. The test events must be editable by any of the 1AM users in the 1AM developer group.
Which solution will meet these requirements?
- A . Create and store the test events in Amazon S3 as JSON objects. Allow S3 bucket access to all 1AM users.
- B . Create the test events. Configure the event sharing settings to make the test events shareable.
- C . Create and store the test events in Amazon DynamoDB. Allow access to DynamoDB by using 1AM roles.
- D . Create the test events. Configure the event sharing settings to make the test events private.
A developer creates a static website for their department The developer deploys the static assets for the website to an Amazon S3 bucket and serves the assets with Amazon CloudFront The developer uses origin access control (OAC) on the CloudFront distribution to access the S3 bucket The developer notices users can access the root URL and specific pages but cannot access directories without specifying a file name. For example, /products/index.html works, but /products returns an error The developer needs to enable accessing directories without specifying a file name without exposing the S3 bucket publicly.
Which solution will meet these requirements?
- A . Update the CloudFront distribution’s settings to index.html as the default root object is set
- B . Update the Amazon S3 bucket settings and enable static website hosting. Specify index html as the Index document Update the S3 bucket policy to enable access. Update the CloudFront distribution’s origin to use the S3 website endpoint
- C . Create a CloudFront function that examines the request URL and appends index.html when directories are being accessed Add the function as a viewer request CloudFront function to the CloudFront distribution’s behavior.
- D . Create a custom error response on the CloudFront distribution with the HTTP error code set to the HTTP 404 Not Found response code and the response page path to /index html Set the HTTP response code to the HTTP 200 OK response code
B
Explanation:
Problem: Directory access without file names fails.
S3 Static Website Hosting:
Configuring S3 as a static website enables automatic serving of index.html for directory requests.
Bucket policies ensure correct access permissions.
Updating the CloudFront origin simplifies routing.
Avoiding Public Exposure: The S3 website endpoint allows CloudFront to access content without
making the bucket public.
Reference: S3 Static Website
Hosting: https://docs.aws.amazon.com/AmazonS3/latest/userguide/WebsiteHosting.html
A developer needs to export the contents of several Amazon DynamoDB tables into Amazon S3 buckets to comply with company data regulations. The developer uses the AWS CLI to run commands to export from each table to the proper S3 bucket. The developer sets up AWS credentials correctly and grants resources appropriate permissions. However, the exports of some tables fail.
What should the developer do to resolve this issue?
- A . Ensure that point-in-time recovery is enabled on the DynamoDB tables.
- B . Ensure that the target S3 bucket is in the same AWS Region as the DynamoDB table.
- C . Ensure that DynamoDB streaming is enabled for the tables.
- D . Ensure that DynamoDB Accelerator (DAX) is enabled.
B
Explanation:
Comprehensive Detailed and Lengthy Step-by-Step Explanation with All AWS Developer
Reference: 1. Understanding the Use Case:
The developer needs to export DynamoDB table data into Amazon S3 buckets using the AWS CLI, and some exports are failing. Proper credentials and permissions have already been configured.
A company is providing read access to objects in an Amazon S3 bucket for different customers. The company uses 1AM permissions to restrict access to the S3 bucket. The customers can access only their own files.
Due to a regulation requirement, the company needs to enforce encryption in transit for interactions with Amazon S3.
Which solution will meet these requirements?
- A . Add a bucket policy to the S3 bucket to deny S3 actions when the aws:SecureTransport condition is equal to false.
- B . Add a bucket policy to the S3 bucket to deny S3 actions when the s3:x-amz-acl condition is equal to public-read.
- C . Add an 1AM policy to the 1AM users to enforce the usage of the AWS SDK.
- D . Add an 1AM policy to the 1AM users that allows S3 actions when the s3:x-amz-acl condition is equal to bucket-owner-read.
An application runs on multiple EC2 instances behind an ELB.
Where is the session data best written so that it can be served reliably across multiple requests?
- A . Write data to Amazon ElastiCache
- B . Write data to Amazon Elastic Block Store
- C . Write data to Amazon EC2 instance Store
- D . Wide data to the root filesystem
A
Explanation:
The solution that will meet the requirements is to write data to Amazon ElastiCache. This way, the application can write session data to a fast, scalable, and reliable in-memory data store that can be served reliably across multiple requests. The other options either involve writing data to persistent storage, which is slower and more expensive than in-memory storage, or writing data to the root filesystem, which is not shared among multiple EC2 instances.
Reference: Using ElastiCache for session management
An application runs on multiple EC2 instances behind an ELB.
Where is the session data best written so that it can be served reliably across multiple requests?
- A . Write data to Amazon ElastiCache
- B . Write data to Amazon Elastic Block Store
- C . Write data to Amazon EC2 instance Store
- D . Wide data to the root filesystem
A
Explanation:
The solution that will meet the requirements is to write data to Amazon ElastiCache. This way, the application can write session data to a fast, scalable, and reliable in-memory data store that can be served reliably across multiple requests. The other options either involve writing data to persistent storage, which is slower and more expensive than in-memory storage, or writing data to the root filesystem, which is not shared among multiple EC2 instances.
Reference: Using ElastiCache for session management
A company uses more than 100 AWS Lambda functions to handle application services. One Lambda function is critical and must always run successfully. The company notices that occasionally, the critical Lambda function does not initiate. The company investigates the issue and discovers instances of the Lambda TooManyRequestsException: Rate Exceeded error in Amazon CloudWatch logs. Upon further review of the logs, the company notices that some of the non-critical functions run properly while the critical function fails. A developer must resolve the errors and ensure that the critical Lambda function runs successfully.
Which solution will meet these requirements with the LEAST operational overhead?
- A . Configure reserved concurrency for the critical Lambda function. Set reserved concurrent executions to the appropriate level.
- B . Configure provisioned concurrency for the critical Lambda function. Set provisioned concurrent executions to the appropriate level.
- C . Configure CloudWatch alarms for TooManyRequestsException errors. Add the critical Lambda function as an alarm state change action to invoke the critical function again after a failure.
- D . Configure CloudWatch alarms for TooManyRequestsException errors. Add Amazon EventBridge as an action for the alarm state change. Use EventBridge to invoke the critical function again after a failure.
A
Explanation:
Reserved concurrency guarantees a specific number of concurrent executions for a critical Lambda
function. This ensures that the critical function always has sufficient resources to execute, even if
other functions are consuming concurrency.
Why Option A:
Ensures Function Availability: Reserved concurrency isolates the critical Lambda function from other functions.
Low Overhead: Configuring reserved concurrency is straightforward and requires minimal setup.
Why Not Other Options:
Option B: Provisioned concurrency is ideal for reducing cold starts, not for managing execution limits.
Option C & D: Alarms and re-invocation mechanisms add complexity without resolving the root
cause.
Reference: Managing Concurrency for AWS Lambda
A developer has deployed an AWS Lambda function that is subscribed to an Amazon Simple Notification Service {Amazon SNS) topic. The developer must implement a solution to add a record of each Lambda function invocation to an Amazon Simple Queue Service {Amazon SQS) queue.
Which solution will meet this requirement?
- A . Configure the SQS queue as a dead-letter queue for the Lambda function.
- B . Create code that uses the AWS SDK to call the SQS SendMessage operation to add the invocation details to the SQS queue. Add the code to the end of the Lambda function.
- C . Add two asynchronous invocation destinations to the Lambda function: one destination for successful invocations and one destination for failed invocations. Configure the SQS queue as the destination for each type. Create an Amazon CloudWatch alarm based on the DestinationDeliveryFailures metric to catch any message that cannot be delivered.
- D . Add a single asynchronous invocation destination to the Lambda function to capture successful invocations. Configure the SQS queue as the destination. Create an Amazon CloudWatch alarm based on the DestinationDeliveryFailures metric to catch any message that cannot be delivered.