Amazon DVA-C02 Practice Exams
Last updated on Oct 23,2026- Exam Code: DVA-C02
- Exam Name: AWS Certified Developer - Associate
- Certification Provider: Amazon
- Latest update: Oct 23,2026
An application uses Lambda functions to extract metadata from files uploaded to an S3 bucket; the metadata is stored in Amazon DynamoDB. The application starts behaving unexpectedly, and the developer wants to examine the logs of the Lambda function code for errors. Based on this system configuration, where would the developer find the logs?
- A . Amazon S3
- B . AWS CloudTrail
- C . Amazon CloudWatch
- D . Amazon DynamoDB
C
Explanation:
Amazon CloudWatch is the service that collects and stores logs from AWS Lambda functions. The developer can use CloudWatch Logs Insights to query and analyze the logs for errors and metrics.
Option A is not correct because Amazon S3 is a storage service that does not store Lambda function logs.
Option B is not correct because AWS CloudTrail is a service that records API calls and events for AWS services, not Lambda function logs.
Option D is not correct because Amazon DynamoDB is a database service that does not store Lambda function logs.
Reference: AWS Lambda Monitoring, [CloudWatch Logs Insights]
A developer is creating an AWS Lambda function that needs network access to private resources in a VPC.
- A . Attach the Lambda function to the VPC through private subnets. Create a security group that allows network access to the private resources. Associate the security group with the Lambda function.
- B . Configure the Lambda function to route traffic through a VPN connection. Create a security group that allows network access to the private resources. Associate the security group with the Lambda function.
- C . Configure a VPC endpoint connection for the Lambda function. Set up the VPC endpoint to route traffic through a NAT gateway.
- D . Configure an AWS PrivateLink endpoint for the private resources. Configure the Lambda function to reference the PrivateLink endpoint.
A
Explanation:
Comprehensive Detailed Step by Step Explanation with All AWS Developer
Reference: When you need to provide an AWS Lambda function access to private resources in a VPC, the most common and straightforward approach is to attach the Lambda function to a VPC via private subnets. Once the Lambda function is associated with the VPC, you need to configure appropriate security groups to control the access to the private resources.
Lambda with VPC Access: Lambda functions can be attached to private subnets in a VPC, allowing them to access resources like RDS, EC2, or internal services within that VPC.
Security Groups: A security group acts as a virtual firewall for the Lambda function, ensuring that it can access only the necessary resources and ports in the VPC. Alternatives:
Option B involves routing traffic through a VPN, which adds unnecessary complexity and operational overhead compared to simply attaching the Lambda to the VPC.
Option C requires configuring a VPC endpoint and a NAT gateway, which can be complex and costly.
Option D refers to AWS PrivateLink, which is used to access services over private connections, but it’s unnecessary in this scenario unless you need a cross-VPC connection.
Reference: Lambda functions in a VPC
A company’s developer has deployed an application in AWS by using AWS CloudFormation The CloudFormation stack includes parameters in AWS Systems Manager Parameter Store that the application uses as configuration settings. The application can modify the parameter values
When the developer updated the stack to create additional resources with tags, the developer noted that the parameter values were reset and that the values ignored the latest changes made by the application. The developer needs to change the way the company deploys the CloudFormation stack. The developer also needs to avoid resetting the parameter values outside the stack.
Which solution will meet these requirements with the LEAST development effort?
- A . Modify the CloudFormation stack to set the deletion policy to Retain for the Parameter Store parameters.
- B . Create an Amazon DynamoDB table as a resource in the CloudFormation stack to hold configuration data for the application Migrate the parameters that the application is modifying from Parameter Store to the DynamoDB table
- C . Create an Amazon RDS DB instance as a resource in the CloudFormation stack. Create a table in the database for parameter configuration. Migrate the parameters that the application is modifying from Parameter Store to the configuration table
- D . Modify the CloudFormation stack policy to deny updates on Parameter Store parameters
A
Explanation:
Problem: CloudFormation updates reset Parameter Store parameters, disrupting application behavior.
Deletion Policy: CloudFormation has a deletion policy that controls resource behavior when a stack is deleted or updated. The ‘Retain’ policy instructs CloudFormation to preserve a resource’s current state.
Least Development Effort: This solution involves a simple CloudFormation template modification, requiring minimal code changes.
Reference: CloudFormation Deletion
Policies: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html
A large company has its application components distributed across multiple AWS accounts. The company needs to collect and visualize trace data across these accounts.
What should be used to meet these requirements?
- A . AWS X-Ray
- B . Amazon CloudWatch
- C . Amazon VPC flow logs
- D . Amazon OpenSearch Service
An Amazon Simple Queue Service (Amazon SQS) queue serves as an event source for an AWS Lambda function In the SQS queue, each item corresponds to a video file that the Lambda function must convert to a smaller resolution The Lambda function is timing out on longer video files, but the Lambda function’s timeout is already configured to its maximum value
What should a developer do to avoid the timeouts without additional code changes?
- A . Increase the memory configuration of the Lambda function
- B . Increase the visibility timeout on the SQS queue
- C . Increase the instance size of the host that runs the Lambda function.
- D . Use multi-threading for the conversion.
B
Explanation:
Visibility Timeout: When an SQS message is processed by a consumer (here, the Lambda function), it’s temporarily hidden from other consumers. Visibility timeout controls this duration.
How It Helps:
Increase the visibility timeout beyond the maximum processing time your Lambda might typically take for long videos.
This prevents the message from reappearing in the queue while Lambda is still working, avoiding
premature timeouts.
Reference: SQS Visibility
Timeout: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html
A developer wants to store information about movies. Each movie has a title, release year, and genre. The movie information also can include additional properties about the cast and production crew. This additional information is inconsistent across movies. For example, one movie might have an assistant director, and another movie might have an animal trainer.
The developer needs to implement a solution to support the following use cases:
For a given title and release year, get all details about the movie that has that title and release year.
For a given title, get all details about all movies that have that title.
For a given genre, get all details about all movies in that genre.
Which data store configuration will meet these requirements?
- A . Create an Amazon DynamoDB table. Configure the table with a primary key that consists of the title as the partition key and the release year as the sort key. Create a global secondary index that uses the genre as the partition key and the title as the sort key.
- B . Create an Amazon DynamoDB table. Configure the table with a primary key that consists of the genre as the partition key and the release year as the sort key. Create a global secondary index that uses the title as the partition key.
- C . On an Amazon RDS DB instance, create a table that contains columns for title, release year, and genre. Configure the title as the primary key.
- D . On an Amazon RDS DB instance, create a table where the primary key is the title and all other data is encoded into JSON format as one additional column.
A
Explanation:
Amazon DynamoDB is a fully managed NoSQL database service that provides fast and consistent performance with seamless scalability. The developer can create a DynamoDB table and configure the table with a primary key that consists of the title as the partition key and the release year as the sort key. This will enable querying for a given title and release year efficiently. The developer can also create a global secondary index that uses the genre as the partition key and the title as the sort key. This will enable querying for a given genre efficiently. The developer can store additional properties about the cast and production crew as attributes in the DynamoDB table. These attributes can have different data types and structures, and they do not need to be consistent across items.
Reference: [Amazon DynamoDB]
[Working with Queries – Amazon DynamoDB]
[Working with Global Secondary Indexes – Amazon DynamoDB]
A developer runs an application that displays scores for sports games on Amazon EC2 instances. The application uses a Redis client to retrieve the scores from an Amazon ElastiCache (Redis OSS) cluster. The developer observes increased latency during operations on the cache because of connection
failures to the cluster. The developer needs to resolve the latency issues.
- A . Configure the Redis client to use an exponential backoff retry strategy to establish cache connections.
- B . Store the scores in the application’s memory. Perform bulk set operations on the scores that are stored in memory.
- C . Configure the Redis client in the application to persist connections to the cluster by implementing a connection pool.
- D . Deploy more nodes in the ElastiCache cluster. Update the Redis client to discover the new nodes.
C
Explanation:
Why Option C is Correct:
Implementing a connection pool in the Redis client reduces connection overhead and avoids frequent connection establishment, which helps to reduce latency and connection failures.
Why Other Options are Incorrect:
Option A: Exponential backoff retry strategies help with transient failures but do not resolve latency caused by frequent connection establishment.
Option B: Storing scores in application memory adds complexity and risks inconsistency.
Option D: Adding more nodes is unnecessary unless the cluster is under heavy load. Latency due to connection failures is better addressed at the application level. AWS Documentation
Reference: Amazon ElastiCache Best Practices
A developer needs to write an AWS CloudFormation template on a local machine and deploy a CloudFormation stack to AWS.
What must the developer do to complete these tasks?
- A . Install the AWS CLI. Configure the AWS CLI by using an I AM user name and password.
- B . Install the AWS CLI. Configure the AWS CLI by using an SSH key.
- C . Install the AWS CLI. Configure the AWS CLI by using an 1AM user access key and secret key.
- D . Install an AWS software development kit (SDK). Configure the SDK by using an X.509 certificate.
A developer manages a website that distributes its content by using Amazon CloudFront. The website’s static artifacts are stored in an Amazon S3 bucket.
The developer deploys some changes and can see the new artifacts in the S3 bucket. However, the changes do not appear on the webpage that the CloudFront distribution delivers.
How should the developer resolve this issue?
- A . Configure S3 Object Lock to update to the latest version of the files every time an S3 object is updated.
- B . Configure the S3 bucket to clear all old objects from the bucket before new artifacts are uploaded.
- C . Set CloudFront to invalidate the cache after the artifacts have been deployed to Amazon S3.
- D . Set CloudFront to modify the distribution origin after the artifacts have been deployed to Amazon S3.
An application that is deployed to Amazon EC2 is using Amazon DynamoDB. The app cation calls the DynamoDB REST API Periodically the application receives a ProvisionedThroughputExceededException error when the application writes to a DynamoDB table.
Which solutions will mitigate this error MOST cost-effectively^ (Select TWO)
- A . Modify the application code to perform exponential back off when the error is received.
- B . Modify the application to use the AWS SDKs for DynamoDB.
- C . Increase the read and write throughput of the DynamoDB table.
- D . Create a DynamoDB Accelerator (DAX) cluster for the DynamoDB table.
- E . Create a second DynamoDB table Distribute the reads and writes between the two tables.
A, B
Explanation:
These solutions will mitigate the error most cost-effectively because they do not require increasing the provisioned throughput of the DynamoDB table or creating additional resources. Exponential backoff is a retry strategy that increases the waiting time between retries to reduce the number of requests sent to DynamoDB. The AWS SDKs for DynamoDB implement exponential backoff by default and also provide other features such as automatic pagination and encryption. Increasing the read and write throughput of the DynamoDB table, creating a DynamoDB Accelerator (DAX) cluster, or creating a second DynamoDB table will incur additional costs and complexity.
Reference: [Error Retries and Exponential Backoff in AWS], [Using the AWS SDKs with DynamoDB]