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 a web application that is hosted on Amazon EC2 instances The EC2 instances are configured to stream logs to Amazon CloudWatch Logs The company needs to receive an Amazon Simple Notification Service (Amazon SNS) notification when the number of application error messages exceeds a defined threshold within a 5-minute period Which solution will meet these requirements?
- A . Rewrite the application code to stream application logs to Amazon SNS Configure an SNS topic to send a notification when the number of errors exceeds the defined threshold within a 5-minute period
- B . Configure a subscription filter on the CloudWatch Logs log group. Configure the filter to send an SNS notification when the number of errors exceeds the defined threshold within a 5-minute period.
- C . Install and configure the Amazon Inspector agent on the EC2 instances to monitor for errors Configure Amazon Inspector to send an SNS notification when the number of errors exceeds the defined threshold within a 5-minute period
- D . Create a CloudWatch metric filter to match the application error pattern in the log data. Set up a CloudWatch alarm based on the new custom metric. Configure the alarm to send an SNS notification when the number of errors exceeds the defined threshold within a 5-minute period.
D
Explanation:
CloudWatch for Log Analysis: CloudWatch is the best fit here because logs are already centralized.
Here’s the process:
Metric Filter: Create a metric filter on the CloudWatch Logs log group. Design a pattern to specifically identify application error messages.
Custom Metric: This filter generates a new custom CloudWatch metric (e.g., ApplicationErrors). This metric tracks the error count.
CloudWatch Alarm: Create an alarm on the ApplicationErrors metric. Configure the alarm with your desired threshold and a 5-minute evaluation period.
SNS Action: Set the alarm to trigger an SNS notification when it enters the alarm state.
Reference: CloudWatch Metric
Filters: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/MonitoringLogData.html CloudWatch
Alarms: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmai l.html
A company has a large amount of data in an Amazon DynamoDB table. A large batch of data is appended to the table once each day. The company wants a solution that will make all the existing and future data in DynamoDB available for analytics on a long-term basis.
Which solution meets these requirements with the LEAST operational overhead?
- A . Configure DynamoDB incremental exports to Amazon S3.
- B . Configure Amazon DynamoDB Streams to write records to Amazon S3.
- C . Configure Amazon EMR to copy DynamoDB data to Amazon S3.
- D . Configure Amazon EMR to copy DynamoDB data to Hadoop Distributed File System (HDFS).
A
Explanation:
Why Option A is Correct:
DynamoDB supports incremental exports to Amazon S3 natively, making data analytics-ready with minimal operational overhead.
Why Other Options are Incorrect:
Option B: DynamoDB Streams require additional processing logic to write to S3, increasing complexity.
Option C & D: Using EMR for data movement adds unnecessary operational overhead compared to native exports.
AWS Documentation
Reference: DynamoDB Exports to S3
A company runs an application on AWS The application stores data in an Amazon DynamoDB table Some queries are taking a long time to run These slow queries involve an attribute that is not the table’s partition key or sort key
The amount of data that the application stores in the DynamoDB table is expected to increase significantly. A developer must increase the performance of the queries.
Which solution will meet these requirements?
- A . Increase the page size for each request by setting the Limit parameter to be higher than the default value Configure the application to retry any request that exceeds the provisioned throughput.
- B . Create a global secondary index (GSI). Set query attribute to be the partition key of the index
- C . Perform a parallel scan operation by issuing individual scan requests in the parameters specify the segment for the scan requests and the total number of segments for the parallel scan.
- D . Turn on read capacity auto scaling for the DynamoDB table. Increase the maximum read capacity units (RCUs).
B
Explanation:
Global Secondary Index (GSI): GSIs enable alternative query patterns on a DynamoDB table by using different partition and sort keys.
Addressing Query Bottleneck: By making the slow-query attribute the GSI’s partition key, you optimize queries on that attribute.
Scalability: GSIs automatically scale to handle increasing data volumes.
Reference: Amazon DynamoDB Global Secondary
Indexes: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GSI.html
A company is building a serverless application on AWS. The application uses an AWS Lambda function to process customer orders 24 hours a day, 7 days a week. The Lambda function calls an external vendor’s HTTP API to process payments.
During load tests, a developer discovers that the external vendor payment processing API occasionally times out and returns errors. The company expects that some payment processing API calls will return errors.
The company wants the support team to receive notifications in near real time only when the payment processing external API error rate exceed 5% of the total number of transactions in an hour. Developers need to use an existing Amazon Simple Notification Service (Amazon SNS) topic that is configured to notify the support team.
Which solution will meet these requirements?
- A . Write the results of payment processing API calls to Amazon CloudWatch. Use Amazon CloudWatch Logs Insights to query the CloudWatch logs. Schedule the Lambda function to check the CloudWatch logs and notify the existing SNS topic.
- B . Publish custom metrics to CloudWatch that record the failures of the external payment processing API calls. Configure a CloudWatch alarm to notify the existing SNS topic when error rate exceeds the specified rate.
- C . Publish the results of the external payment processing API calls to a new Amazon SNS topic.
Subscribe the support team members to the new SNS topic. - D . Write the results of the external payment processing API calls to Amazon S3. Schedule an Amazon Athena query to run at regular intervals. Configure Athena to send notifications to the existing SNS topic when the error rate exceeds the specified rate.
B
Explanation:
Amazon CloudWatch is a service that monitors AWS resources and applications. The developer can publish custom metrics to CloudWatch that record the failures of the external payment processing API calls. The developer can configure a CloudWatch alarm to notify the existing SNS topic when the error rate exceeds 5% of the total number of transactions in an hour. This solution will meet the requirements in a near real-time and scalable way.
Reference: [What Is Amazon CloudWatch? – Amazon CloudWatch]
[Publishing Custom Metrics – Amazon CloudWatch]
[Creating Amazon CloudWatch Alarms – Amazon CloudWatch]
A company runs an ecommerce application on AWS. The application stores data in an Amazon Aurora database.
A developer is adding a caching layer to the application. The caching strategy must ensure that the application always uses the most recent value for each data item.
Which caching strategy will meet these requirements?
- A . Implement a TTL strategy for every item that is saved in the cache.
- B . Implement a write-through strategy for every item that is created and updated.
- C . Implement a lazy loading strategy for every item that is loaded.
- D . Implement a read-through strategy for every item that is loaded.
A company hosts its application on AWS. The application runs on an Amazon Elastic Container Service (Amazon ECS) cluster that uses AWS Fargate. The cluster runs behind an Application Load Balancer The application stores data in an Amazon Aurora database A developer encrypts and manages database credentials inside the application
The company wants to use a more secure credential storage method and implement periodic credential rotation.
Which solution will meet these requirements with the LEAST operational overhead?
- A . Migrate the secret credentials to Amazon RDS parameter groups. Encrypt the parameter by using an AWS Key Management Service (AWS KMS) key Turn on secret rotation. Use 1AM policies and roles to grant AWS KMS permissions to access Amazon RDS.
- B . Migrate the credentials to AWS Systems Manager Parameter Store. Encrypt the parameter by using an AWS Key Management Service (AWS KMS) key. Turn on secret rotation. Use 1AM policies and roles to grant Amazon ECS Fargate permissions to access to AWS Secrets Manager
- C . Migrate the credentials to ECS Fargate environment variables. Encrypt the credentials by using an AWS Key Management Service (AWS KMS) key Turn on secret rotation. Use 1AM policies and roles to grant Amazon ECS Fargate permissions to access to AWS Secrets Manager.
- D . Migrate the credentials to AWS Secrets Manager. Encrypt the credentials by using an AWS Key Management Service (AWS KMS) key Turn on secret rotation Use 1AM policies and roles to grant Amazon ECS Fargate permissions to access to AWS Secrets Manager by using keys.
D
Explanation:
Secrets Management: AWS Secrets Manager is designed specifically for storing and managing sensitive credentials.
Built-in Rotation: Secrets Manager provides automatic secret rotation functionality, enhancing security posture significantly.
IAM Integration: IAM policies and roles grant fine-grained access to ECS Fargate, ensuring the principle of least privilege.
Reduced Overhead: This solution centralizes secrets management and automates rotation, reducing operational overhead compared to the other options.
Reference: AWS Secrets Manager: https://aws.amazon.com/secrets-manager/ Secrets Manager
Rotation: https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotating-secrets.html IAM for Secrets Manager: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access_iam-policies.html
A developer has created a large AWS Lambda function. Deployment of the function Is failing because of an InvalidParameterValueException error. The error message indicates that the unzipped size of the function exceeds the maximum supported value.
Which actions can the developer take to resolve this error? (Select TWO.)
- A . Submit a quota increase request to AWS Support to increase the function to the required size.
- B . Use a compression algorithm that is more efficient than ZIP.
- C . Break up the function into multiple smaller functions.
- D . Zip the .zip file twice to compress the file more.
- E . Move common libraries, function dependencies, and custom runtimes into Lambda layers.
A company runs a payment application on Amazon EC2 instances behind an Application Load Balance. The EC2 instances run in an Auto Scaling group across multiple Availability Zones The application needs to retrieve application secrets during the application startup and export the secrets as environment variables These secrets must be encrypted at rest and need to be rotated every month.
Which solution will meet these requirements with the LEAST development effort?
- A . Save the secrets in a text file and store the text file in Amazon S3 Provision a customer managed key Use the key for secret encryption in Amazon S3 Read the contents of the text file and read the export as environment variables Configure S3 Object Lambda to rotate the text file every month
- B . Save the secrets as strings in AWS Systems Manager Parameter Store and use the default AWS Key Management Service (AWS KMS) key Configure an Amazon EC2 user data script to retrieve the secrets during the startup and export as environment variables Configure an AWS Lambda function to rotate the secrets in Parameter Store every month.
- C . Save the secrets as base64 encoded environment variables in the application properties. Retrieve the secrets during the application startup. Reference the secrets in the application code. Write a script to rotate the secrets saved as environment variables.
- D . Store the secrets in AWS Secrets Manager Provision a new customer master key Use the key to encrypt the secrets Enable automatic rotation Configure an Amazon EC2 user data script to programmatically retrieve the secrets during the startup and export as environment variables
D
Explanation:
AWS Secrets Manager: Built for managing secrets, providing encryption, automatic rotation, and access control.
Customer Master Key (CMK): Provides an extra layer of control over encryption through AWS KMS.
Automatic Rotation: Enhances security by regularly changing the secret.
User Data Script: Allows secrets retrieval at instance startup and sets them as environment variables
for seamless use within the application.
Reference: AWS Secrets Manager Documentation: https://docs.aws.amazon.com/secretsmanager/
AWS KMS Documentation: https://docs.aws.amazon.com/kms/
User Data for EC2 Instances: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html
A developer built an application that calls an external API to obtain data, processes the data, and saves the result to Amazon S3. The developer built a container image with all of the necessary dependencies to run the application as a container.
The application runs locally and requires minimal CPU and RAM resources. The developer has created an Amazon ECS cluster. The developer needs to run the application hourly in Amazon ECS.
Which solution will meet these requirements with the LEAST amount of infrastructure management overhead?
- A . Add a capacity provider to manage instances.
- B . Add an Amazon EC2 instance that runs the application.
- C . Define a task definition with an AWS Fargate launch type.
- D . Create an Amazon ECS cluster and add the managed node groups feature to run the application.
C
Explanation:
Requirement Summary:
Containerized app
Runs hourly
Minimal CPU and RAM
Goal: Least infrastructure management
Evaluate Options:
A company is building a content authoring application. The application has multiple user groups, such as content creator, reviewer, approver, and administrator. The company needs to assign users fine-grained permissions for specific parts of the application.
The company needs a solution to configure, maintain, and analyze user permissions. The company wants a solution that can be easily adapted to work with newer applications in the future. The company must use a third-party OpenID Connect (OIDC) identity provider (IdP) to authenticate users.
- A . Configure an Amazon Cognito identity pool for the application. Use the identity pool identities within the application to manage user permissions.
- B . Configure the application to check user permissions upon request. Configure the application logic to manage user permissions.
- C . Use Amazon Verified Permissions to set up user permissions. Integrate Verified Permissions with a third-party IdP. Configure the application to request authorization decisions from Verified Permissions.
- D . Set up an IAM role for each user group. Assign users appropriate IAM roles. Configure the application to determine appropriate permissions for each user based on the user’s IAM role.
C
Explanation:
Why Option C is Correct:
Amazon Verified Permissions provides fine-grained access control capabilities, making it ideal for managing complex user permissions. It integrates with OIDC IdPs for authentication and allows applications to request authorization decisions dynamically. It is also easily adaptable to newer applications.
Why Other Options are Incorrect:
Option A: Cognito identity pools do not natively support fine-grained permission analysis or management.
Option B: Managing permissions in application logic adds significant operational overhead.
Option D: IAM roles are not designed for application-specific fine-grained access control and are
more suitable for resource-level permissions.
AWS Documentation
Reference: Amazon Verified Permissions