Amazon DVA-C02 Practice Exams
Last updated on Oct 22,2026- Exam Code: DVA-C02
- Exam Name: AWS Certified Developer - Associate
- Certification Provider: Amazon
- Latest update: Oct 22,2026
A company has an application that runs across multiple AWS Regions. The application is experiencing performance issues at irregular intervals. A developer must use AWS X-Ray to implement distributed tracing for the application to troubleshoot the root cause of the performance issues.
What should the developer do to meet this requirement?
- A . Use the X-Ray console to add annotations for AWS services and user-defined services
- B . Use Region annotation that X-Ray adds automatically for AWS services Add Region annotation for user-defined services
- C . Use the X-Ray daemon to add annotations for AWS services and user-defined services
- D . Use Region annotation that X-Ray adds automatically for user-defined services Configure X-Ray to add Region annotation for AWS services
B
Explanation:
Distributed Tracing with X-Ray: X-Ray helps visualize request paths and identify bottlenecks in applications distributed across Regions.
Region Annotations (Automatic for AWS Services): X-Ray automatically adds a Region annotation to segments representing calls to AWS services. This aids in tracing cross-Region traffic.
Region Annotations (Manual for User-Defined): For segments representing calls to user-defined
services in different Regions, the developer needs to add the Region annotation manually to enable
comprehensive tracing.
Reference: AWS X-Ray: https://aws.amazon.com/xray/
An 1AM role is attached to an Amazon EC2 instance that explicitly denies access to all Amazon S3 API actions. The EC2 instance credentials file specifies the 1AM access key and secret access key, which allow full administrative access.
Given that multiple modes of 1AM access are present for this EC2 instance, which of the following is correct?
- A . The EC2 instance will only be able to list the S3 buckets.
- B . The EC2 instance will only be able to list the contents of one S3 bucket at a time.
- C . The EC2 instance will be able to perform all actions on any S3 bucket.
- D . The EC2 instance will not be able to perform any S3 action on any S3 bucket.
A developer is preparing to begin development of a new version of an application. The previous version of the application is deployed in a production environment. The developer needs to deploy fixes and updates to the current version during the development of the new version of the application. The code for the new version of the application is stored in AWS CodeCommit.
Which solution will meet these requirements?
- A . From the main branch, create a feature branch for production bug fixes. Create a second feature branch from the main branch for development of the new version.
- B . Create a Git tag of the code that is currently deployed in production. Create a Git tag for the development of the new version. Push the two tags to the CodeCommit repository.
- C . From the main branch, create a branch of the code that is currently deployed in production. Apply an IAM policy that ensures no other other users can push or merge to the branch.
- D . Create a new CodeCommit repository for development of the new version of the application.
Create a Git tag for the development of the new version.
A
Explanation:
A feature branch is a branch that is created from the main branch to work on a specific feature or task1. Feature branches allow developers to isolate their work from the main branch and avoid conflicts with other changes1. Feature branches can be merged back to the main branch when the feature or task is completed and tested1.
In this scenario, the developer needs to maintain two parallel streams of work: one for fixing and updating the current version of the application that is deployed in production, and another for developing the new version of the application. The developer can use feature branches to achieve this goal.
The developer can create a feature branch from the main branch for production bug fixes. This branch will contain the code that is currently deployed in production, and any fixes or updates that need to be applied to it. The developer can push this branch to the CodeCommit repository and use it to deploy changes to the production environment.
The developer can also create a second feature branch from the main branch for development of the new version of the application. This branch will contain the code that is under development for the new version, and any changes or enhancements that are part of it. The developer can push this branch to the CodeCommit repository and use it to test and deploy the new version of the application in a separate environment.
By using feature branches, the developer can keep the main branch stable and clean, and avoid mixing code from different versions of the application. The developer can also easily switch between branches and merge them when needed.
A developer is building an application to process a stream of customer orders. The application sends processed orders to an Amazon Aurora MySQL database. The application needs to process the orders in batches.
The developer needs to configure a workflow that ensures each record is processed before the
application sends each order to the database.
Options:
- A . Use Amazon Kinesis Data Streams to stream the orders. Use an AWS Lambda function to process the orders. Configure an event source mapping for the Lambda function, and set the MaximumBatchingWindowInSeconds setting to 300.
- B . Use Amazon SQS to stream the orders. Use an AWS Lambda function to process the orders. Configure an event source mapping for the Lambda function, and set the MaximumBatchingWindowInSeconds setting to 0.
- C . Use Amazon Managed Streaming for Apache Kafka (Amazon MSK) to stream the orders. Use an Amazon EC2 instance to process the orders. Configure an event source mapping for the EC2 instance, and increase the payload size limit to 36 MB.
- D . Use Amazon DynamoDB Streams to stream the orders. Use an Amazon ECS cluster on AWS Fargate to process the orders. Configure an event source mapping for the cluster, and set the BatchSize setting to 1.
A
Explanation:
Step 1: Understanding the Problem
Processing in Batches: The application must process records in groups.
Sequential Processing: Each record in the batch must be processed before writing to Aurora.
Solution Goals: Use services that support ordered, batched processing and integrate with Aurora.
Step 2: Solution Analysis
Option A:
Amazon Kinesis Data Streams supports ordered data processing.
AWS Lambda can process batches of records via event source mapping with MaximumBatchingWindowInSeconds for timing control.
Configuring the batching window ensures efficient processing and compliance with the workflow.
Correct Option.
Option B:
Amazon SQS is not designed for streaming; it provides reliable, unordered message delivery.
Setting MaximumBatchingWindowInSeconds to 0 disables batching, which is contrary to the requirement.
Not suitable.
Option C:
Amazon MSK provides Kafka-based streaming but requires custom EC2-based processing.
This increases system complexity and operational overhead.
Not ideal for serverless requirements.
Option D:
DynamoDB Streams is event-driven but lacks strong native integration for batch ordering.
Using ECS adds unnecessary complexity.
Not suitable.
Step 3: Implementation Steps for Option A
Set up Kinesis Data Stream:
Configure shards based on the expected throughput.
Configure Lambda with Event Source Mapping:
Enable Kinesis as the event source for Lambda.
Set MaximumBatchingWindowInSeconds to 300 to accumulate data for processing.
Example:
{
"EventSourceArn": "arn:aws:kinesis:region:account-id:stream/stream-name",
"BatchSize": 100,
"MaximumBatchingWindowInSeconds": 300
}
Write Processed Data to Aurora:
Use AWS RDS Data API for efficient database operations from Lambda.
AWS Developer
Reference: Amazon Kinesis Data Streams Developer Guide
AWS Lambda Event Source Mapping
Batch Processing with Lambda
A developer maintains applications that store several secrets in AWS Secrets Manager. The applications use secrets that have changed over time. The developer needs to identify required secrets that are still in use. The developer does not want to cause any application downtime.
What should the developer do to meet these requirements?
- A . Configure an AWS CloudTrail log file delivery to an Amazon S3 bucket. Create an Amazon CloudWatch alarm for the GetSecretValue. Secrets Manager API operation requests
- B . Create a secrets manager-secret-unused AWS Config managed rule. Create an Amazon EventBridge rule to Initiate notification when the AWS Config managed rule is met.
- C . Deactivate the applications secrets and monitor the applications error logs temporarily.
- D . Configure AWS X-Ray for the applications. Create a sampling rule lo match the GetSecretValue Secrets Manager API operation requests.
B
Explanation:
This solution will meet the requirements by using AWS Config to monitor and evaluate whether Secrets Manager secrets are unused or have been deleted, based on specified time periods. The secrets manager-secret-unused managed rule is a predefined rule that checks whether Secrets Manager secrets have been rotated within a specified number of days or have been deleted within a specified number of days after last accessed date. The Amazon EventBridge rule will trigger a notification when the AWS Config managed rule is met, alerting the developer about unused secrets that can be removed without causing application downtime.
Option A is not optimal because it will use AWS CloudTrail log file delivery to an Amazon S3 bucket, which will incur additional costs and complexity for storing and analyzing log files that may not contain relevant information about secret usage.
Option C is not optimal because it will deactivate the application secrets and monitor the application error logs temporarily, which will cause application downtime and potential data loss.
Option D is not optimal because it will use AWS X-Ray to trace secret usage, which will introduce additional overhead and latency for instrumenting and sampling requests that may not be related to secret usage.
Reference: [AWS Config Managed Rules], [Amazon EventBridge]
A developer has created an AWS Lambda function that makes queries to an Amazon Aurora MySQL DB instance. When the developer performs a test the OB instance shows an error for too many connections.
Which solution will meet these requirements with the LEAST operational effort?
- A . Create a read replica for the DB instance Query the replica DB instance instead of the primary DB instance.
- B . Migrate the data lo an Amazon DynamoDB database.
- C . Configure the Amazon Aurora MySQL DB instance tor Multi-AZ deployment.
- D . Create a proxy in Amazon RDS Proxy Query the proxy instead of the DB instance.
D
Explanation:
This solution will meet the requirements by using Amazon RDS Proxy, which is a fully managed, highly available database proxy for Amazon RDS that makes applications more scalable, more resilient to database failures, and more secure. The developer can create a proxy in Amazon RDS Proxy, which sits between the application and the DB instance and handles connection management, pooling, and routing. The developer can query the proxy instead of the DB instance, which reduces the number of open connections to the DB instance and avoids errors for too many connections.
Option A is not optimal because it will create a read replica for the DB instance, which may not solve the problem of too many connections as read replicas also have connection limits and may incur additional costs.
Option B is not optimal because it will migrate the data to an Amazon DynamoDB database, which may introduce additional complexity and overhead for migrating and accessing data from a different database service.
Option C is not optimal because it will configure the Amazon Aurora MySQL DB instance for Multi-AZ deployment, which may improve availability and durability of the DB instance but not reduce the number of connections.
Reference: [Amazon RDS Proxy], [Working with Amazon RDS Proxy]
A company has a web application that runs on Amazon EC2 instances with a custom Amazon Machine Image (AMI) The company uses AWS CloudFormation to provision the application The application runs in the us-east-1 Region, and the company needs to deploy the application to the us-west-1 Region
An attempt to create the AWS CloudFormation stack in us-west-1 fails. An error message states that the AMI ID does not exist. A developer must resolve this error with a solution that uses the least amount of operational overhead
Which solution meets these requirements?
- A . Change the AWS CloudFormation templates for us-east-1 and us-west-1 to use an AWS AMI. Relaunch the stack for both Regions.
- B . Copy the custom AMI from us-east-1 to us-west-1. Update the AWS CloudFormation template for us-west-1 to refer to AMI ID for the copied AMI Relaunch the stack
- C . Build the custom AMI in us-west-1 Create a new AWS CloudFormation template to launch the stack in us-west-1 with the new AMI ID
- D . Manually deploy the application outside AWS CloudFormation in us-west-1.
B
Explanation:
Problem: CloudFormation can’t find the custom AMI in the target region (us-west-1) because AMIs are region-specific.
Copying AMIs:
AMIs can be copied across regions, maintaining their configuration.
This approach minimizes operational overhead as the existing CloudFormation template can be reused with a minor update.
Updating the Template:
Modify the CloudFormation template in us-west-1 to reference the newly copied AMI’s ID in that region.
Reference: Copying AMIs: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/CopyingAMIs.html
CloudFormation Templates and AMIs: [invalid URL removed]
A company has a web application that runs on Amazon EC2 instances with a custom Amazon Machine Image (AMI) The company uses AWS CloudFormation to provision the application The application runs in the us-east-1 Region, and the company needs to deploy the application to the us-west-1 Region
An attempt to create the AWS CloudFormation stack in us-west-1 fails. An error message states that the AMI ID does not exist. A developer must resolve this error with a solution that uses the least amount of operational overhead
Which solution meets these requirements?
- A . Change the AWS CloudFormation templates for us-east-1 and us-west-1 to use an AWS AMI. Relaunch the stack for both Regions.
- B . Copy the custom AMI from us-east-1 to us-west-1. Update the AWS CloudFormation template for us-west-1 to refer to AMI ID for the copied AMI Relaunch the stack
- C . Build the custom AMI in us-west-1 Create a new AWS CloudFormation template to launch the stack in us-west-1 with the new AMI ID
- D . Manually deploy the application outside AWS CloudFormation in us-west-1.
B
Explanation:
Problem: CloudFormation can’t find the custom AMI in the target region (us-west-1) because AMIs are region-specific.
Copying AMIs:
AMIs can be copied across regions, maintaining their configuration.
This approach minimizes operational overhead as the existing CloudFormation template can be reused with a minor update.
Updating the Template:
Modify the CloudFormation template in us-west-1 to reference the newly copied AMI’s ID in that region.
Reference: Copying AMIs: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/CopyingAMIs.html
CloudFormation Templates and AMIs: [invalid URL removed]
A developer has a legacy application that is hosted on-premises. Other applications hosted on AWS depend on the on-premises application for proper functioning. In case of any application errors, the developer wants to be able to use Amazon CloudWatch to monitor and troubleshoot all applications from one place.
How can the developer accomplish this?
- A . Install an AWS SDK on the on-premises server to automatically send logs to CloudWatch.
- B . Download the CloudWatch agent to the on-premises server. Configure the agent to use IAM user credentials with permissions for CloudWatch.
- C . Upload log files from the on-premises server to Amazon S3 and have CloudWatch read the files.
- D . Upload log files from the on-premises server to an Amazon EC2 instance and have the instance forward the logs to CloudWatch.
B
Explanation:
Amazon CloudWatch is a service that monitors AWS resources and applications. The developer can use CloudWatch to monitor and troubleshoot all applications from one place. To do so, the developer needs to download the CloudWatch agent to the on-premises server and configure the agent to use IAM user credentials with permissions for CloudWatch. The agent will collect logs and metrics from the on-premises server and send them to CloudWatch.
Reference: [What Is Amazon CloudWatch? – Amazon CloudWatch]
[Installing and Configuring the CloudWatch Agent – Amazon CloudWatch]
A company has an online web application that includes a product catalog. The catalog is stored in an Amazon S3 bucket that is named DOC-EXAMPLE-BUCKET. The application must be able to list the objects in the S3 bucket and must be able to download objects through an 1AM policy.
Which policy allows MINIMUM access to meet these requirements?

- A . Option A
- B . Option B
- C . Option C
- D . Option D