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 needs to develop a proof of concept for a web service application. The application will show the weather forecast for one of the company’s office locations. The application will provide a REST endpoint that clients can call. Where possible, the application should use caching features provided by AWS to limit the number of requests to the backend service. The application backend will receive a small amount of traffic only during testing.
Which approach should the developer take to provide the REST endpoint MOST cost-effectively?
- A . Create a container image. Deploy the container image by using Amazon EKS. Expose the functionality by using Amazon API Gateway.
- B . Create an AWS Lambda function by using AWS SAM. Expose the Lambda functionality by using Amazon API Gateway.
- C . Create a container image. Deploy the container image by using Amazon ECS. Expose the functionality by using Amazon API Gateway.
- D . Create a microservices application. Deploy the application to AWS Elastic Beanstalk. Expose the AWS Lambda functionality by using an Application Load Balancer.
B
Explanation:
Requirement Summary:
Simple REST endpoint for weather data
Light backend usage (POC, testing)
Wants caching support to reduce backend calls
Must be cost-effective
Evaluate Options:
✅ B: Lambda + API Gateway + SAM
✅ Serverless = No idle costs
✅ API Gateway can enable caching (response caching at endpoint level)
✅ SAM makes deployment simple and repeatable
✅ Perfect for low-traffic testing A: EKS + API Gateway
❌ High overhead
Not cost-effective for POC/testing
C: ECS + API Gateway
❌ Similar to A: Container orchestration not needed for light REST endpoint
D: Elastic Beanstalk + ALB + Lambda
❌ Overly complex and does not directly expose Lambda
Beanstalk better suited for full apps, not small REST functions AWS SAM: https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/what-is-sam.html
API Gateway caching: https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-caching.html
Serverless Best Practices: https://docs.aws.amazon.com/lambda/latest/dg/best-practices.html
A developer is working on a serverless application that needs to process any changes to an Amazon DynamoDB table with an AWS Lambda function.
How should the developer configure the Lambda function to detect changes to the DynamoDB table?
- A . Create an Amazon Kinesis data stream, and attach it to the DynamoDB table. Create a trigger to connect the data stream to the Lambda function.
- B . Create an Amazon EventBridge rule to invoke the Lambda function on a regular schedule. Conned to the DynamoDB table from the Lambda function to detect changes.
- C . Enable DynamoDB Streams on the table. Create a trigger to connect the DynamoDB stream to the Lambda function.
- D . Create an Amazon Kinesis Data Firehose delivery stream, and attach it to the DynamoDB table.
Configure the delivery stream destination as the Lambda function.
C
Explanation:
Amazon DynamoDB is a fully managed NoSQL database service that provides fast and consistent performance with seamless scalability. DynamoDB Streams is a feature that captures data modification events in DynamoDB tables. The developer can enable DynamoDB Streams on the table and create a trigger to connect the DynamoDB stream to the Lambda function. This solution will enable the Lambda function to detect changes to the DynamoDB table in near real time.
Reference: [Amazon DynamoDB]
[DynamoDB Streams – Amazon DynamoDB]
[Using AWS Lambda with Amazon DynamoDB – AWS Lambda]
A company is using Amazon RDS as the Backend database for its application. After a recent marketing campaign, a surge of read requests to the database increased the latency of data retrieval from the database.
The company has decided to implement a caching layer in front of the database. The cached content
must be encrypted and must be highly available.
Which solution will meet these requirements?
- A . Amazon Cloudfront
- B . Amazon ElastiCache to Memcached
- C . Amazon ElastiCache for Redis in cluster mode
- D . Amazon DynamoDB Accelerate (DAX)
C
Explanation:
This solution meets the requirements because it provides a caching layer that can store and retrieve encrypted data from multiple nodes. Amazon ElastiCache for Redis supports encryption at rest and in transit, and can scale horizontally to increase the cache capacity and availability. Amazon ElastiCache for Memcached does not support encryption, Amazon CloudFront is a content delivery network that is not suitable for caching database queries, and Amazon DynamoDB Accelerator (DAX) is a caching service that only works with DynamoDB tables.
Reference: [Amazon ElastiCache for Redis Features], [Choosing a Cluster Engine]
A company is migrating an on-premises database to Amazon RDS for MySQL. The company has read-heavy workloads. The company wants to refactor the code to achieve optimum read performance for queries.
Which solution will meet this requirement with LEAST current and future effort?
- A . Use a multi-AZ Amazon RDS deployment. Increase the number of connections that the code makes to the database or increase the connection pool size if a connection pool is in use.
- B . Use a multi-AZ Amazon RDS deployment. Modify the code so that queries access the secondary RDS instance.
- C . Deploy Amazon RDS with one or more read replicas. Modify the application code so that queries use the URL for the read replicas.
- D . Use open source replication software to create a copy of the MySQL database on an Amazon EC2 instance. Modify the application code so that queries use the IP address of the EC2 instance.
C
Explanation:
Amazon RDS for MySQL supports read replicas, which are copies of the primary database instance that can handle read-only queries. Read replicas can improve the read performance of the database by offloading the read workload from the primary instance and distributing it across multiple replicas. To use read replicas, the application code needs to be modified to direct read queries to the URL of the read replicas, while write queries still go to the URL of the primary instance. This solution requires less current and future effort than using a multi-AZ deployment, which does not provide read scaling benefits, or using open source replication software, which requires additional configuration and maintenance.
Reference: Working with read replicas
A developer is building an application on AWS. The application has an Amazon API Gateway API that sends requests to an AWS Lambda function. The API is experiencing increased latency because the Lambda function has limited available CPU to fulfill the requests.
Before the developer deploys the API into production, the developer must configure the Lambda function to have more CPU.
Which solution will meet this requirement?
- A . Increase the virtual CPU (vCPU) cores quota of the Lambda function.
- B . Increase the amount of memory that is allocated to the Lambda function.
- C . Increase the ephemeral storage size of the Lambda function.
- D . Increase the timeout value of the Lambda function.
A developer is creating a microservices application that runs across multiple compute environments. The application must securely access secrets that are stored in AWS Secrets Manager with minimal network latency. The developer wants a solution that reduces the number of direct calls to Secrets Manager and simplifies secrets management across environments.
Which solution will meet these requirements with the LEAST operational overhead?
- A . Create a custom script that retrieves secrets directly from Secrets Manager and caches the secrets in a local database for each compute environment.
- B . Install the Secrets Manager Agent in each compute environment. Configure the agent to cache secrets locally. Securely retrieve the secrets from Secrets Manager as needed.
- C . Implement lazy loading logic in the application to fetch secrets directly from Secrets Manager and to cache the secrets in Redis.
- D . Store the secrets in an Amazon S3 bucket. Retrieve and load the secrets as environment variables during application startup for each compute environment.
B
Explanation:
The Secrets Manager Agent provides an out-of-the-box solution for securely caching secrets locally,
reducing latency and operational overhead.
Why Option B is Correct:
Caching: The agent securely caches secrets locally, minimizing Secrets Manager API calls.
Security: Secrets remain secure during retrieval and storage.
Low Operational Overhead: Managed solution eliminates the need for custom logic.
Why Not Other Options:
Option A: Custom scripts introduce complexity and require ongoing maintenance.
Option C: Using Redis requires managing an additional service, increasing overhead.
Option D: Storing secrets in S3 lacks the fine-grained security controls of Secrets Manager.
Reference: Caching Secrets in AWS Secrets Manager
An application that runs on AWS receives messages from an Amazon Simple Queue Service (Amazon SQS) queue and processes the messages in batches. The application sends the data to another SQS queue to be consumed by another legacy application. The legacy system can take up to 5 minutes to process some transaction data.
A developer wants to ensure that there are no out-of-order updates in the legacy system. The developer cannot alter the behavior of the legacy system.
Which solution will meet these requirements?
- A . Use an SQS FIFO queue. Configure the visibility timeout value.
- B . Use an SQS standard queue with a SendMessageBatchRequestEntry data type. Configure the DelaySeconds values.
- C . Use an SQS standard queue with a SendMessageBatchRequestEntry data type. Configure the visibility timeout value.
- D . Use an SQS FIFO queue. Configure the DelaySeconds value.
A
Explanation:
An SQS FIFO queue is a type of queue that preserves the order of messages and ensures that each message is delivered and processed only once1. This is suitable for the scenario where the developer wants to ensure that there are no out-of-order updates in the legacy system.
The visibility timeout value is the amount of time that a message is invisible in the queue after a consumer receives it2. This prevents other consumers from processing the same message simultaneously. If the consumer does not delete the message before the visibility timeout expires, the message becomes visible again and another consumer can receive it2.
In this scenario, the developer needs to configure the visibility timeout value to be longer than the maximum processing time of the legacy system, which is 5 minutes. This will ensure that the message remains invisible in the queue until the legacy system finishes processing it and deletes it. This will prevent duplicate or out-of-order processing of messages by the legacy system.
A company is developing a serverless application that requires storage of sensitive API keys as environment variables for various services. The application requires the automatic rotation of the encryption keys every year.
Which solution will meet these requirements with no development effort?
- A . Encrypt the environment variables by using AWS Secrets Manager. Set up automatic rotation in Secrets Manager.
- B . Encrypt the environment variables by using AWS Key Management Service (AWS KMS) customer managed keys. Enable automatic key rotation.
- C . Encrypt the environment variables by using AWS Key Management Service (AWS KMS) AWS
managed keys. Configure a custom AWS Lambda function to automate key rotation. - D . Encrypt the environment variables by using AWS Systems Manager Parameter Store. Set up automatic rotation in Parameter Store.
A company is building a serverless application on AWS. The application uses Amazon API Gateway and AWS Lambda. The company wants to deploy the application to its development, test, and production environments.
Which solution will meet these requirements with the LEAST development effort?
- A . Use API Gateway stage variables and create Lambda aliases to reference environment-specific resources.
- B . Use Amazon ECS to deploy the application to the environments.
- C . Duplicate the code for each environment. Deploy the code to a separate API Gateway stage.
- D . Use AWS Elastic Beanstalk to deploy the application to the environments.
A
Explanation:
Requirement Summary:
Deploy serverless application using:
API Gateway
AWS Lambda
Need dev, test, and prod environments
Want least development effort
Evaluate Options:
Option A: API Gateway stage variables + Lambda aliases
✅ Most efficient and scalable
API Gateway supports stage variables (like env)
Lambda supports aliases (e.g., dev, test, prod)
You can configure each stage to point to a different alias of the same function version Enables versioning, isolation, and low effort management Option B: Use Amazon ECS
❌ Overkill for a serverless setup ECS is container-based, not serverless Introduces unnecessary complexity
Option C: Duplicate code for each environment
❌ High operational overhead and poor maintainability Option D: Use Elastic Beanstalk
❌ Not applicable: Elastic Beanstalk is for traditional app hosting, not optimal for Lambda + API Gateway
Lambda Aliases: https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html
API Gateway Stage Variables:
https://docs.aws.amazon.com/apigateway/latest/developerguide/stage-variables.html
A developer needs to perform geographic load testing of an API. The developer must deploy resources to multiple AWS Regions to support the load testing of the API.
How can the developer meet these requirements without additional application code?
- A . Create and deploy an AWS Lambda function in each desired Region. Configure the Lambda function to create a stack from an AWS CloudFormation template in that Region when the function is invoked.
- B . Create an AWS CloudFormation template that defines the load test resources. Use the AWS CLI create-stack-set command to create a stack set in the desired Regions.
- C . Create an AWS Systems Manager document that defines the resources. Use the document to create the resources in the desired Regions.
- D . Create an AWS CloudFormation template that defines the load test resources. Use the AWS CLI deploy command to create a stack from the template in each Region.
B
Explanation:
AWS CloudFormation is a service that allows developers to model and provision AWS resources using
templates. A CloudFormation template can define the load test resources, such as EC2 instances, load balancers, and Auto Scaling groups. A CloudFormation stack set is a collection of stacks that can be created and managed from a single template in multiple Regions and accounts. The AWS CLI create-stack-set command can be used to create a stack set from a template and specify the Regions where the stacks should be created.
Reference: Working with AWS CloudFormation stack sets