Free AWS Certified Developer Associate DVA-C02 Practice Test

Prepare for the AWS Certified Developer Associate DVA-C02 exam with this free practice test. Randomly generated and customizable, this test allows you to choose the number of questions.

  • Questions: 15
  • Time: 15 minutes (60 seconds per question)
  • Included Objectives:
    • Troubleshooting and Optimization
    • Deployment
    • Security
    • Development with AWS Services
Question 1 of 15

Your team's e-commerce application, hosted on AWS, frequently encounters performance bottlenecks during flash sales, leading to exceptions when processing payments. These exceptions are often due to database write limits being exceeded. To mitigate the issue, you've been asked to refine the application's interaction with the database. What pattern should you employ to address the limitation errors in your application logic?

  • Employ a retry mechanism that introduces increasing delays between attempts, along with random variation in timing (exponential backoff and jitter).

  • Ignore the exceptions from the database and assume that the transactions will be processed eventually without any additional logic.

  • Continuously attempt to resend the failed transactions at a fixed interval until they are processed without any exceptions.

  • Automatically switch the database to on-demand capacity mode within the application logic when exceptions are caught.

  • Dynamically adjust the provisioned capacity of the database immediately in the code based on the exceptions received.

Question 2 of 15

Which AWS service provides a managed in-memory data store that is compatible with Redis or Memcached?

  • Amazon ElastiCache

  • Amazon S3

  • Amazon DynamoDB

  • Amazon RDS

Question 3 of 15

A software engineer needs to automate the deployment of a server-side application that relies on functions triggered by HTTP requests. The engineer plans to manage this application across various environments, each requiring distinct settings. Which service should the engineer choose to define the function triggers and environment configurations in a template format?

  • Pipeline Automation Service

  • Serverless Application Model

  • Deployment Automation Service

  • Cloud Infrastructure Development Kit

  • Web Application Hosting Service

  • Infrastructure as Code Service

Question 4 of 15

A development team is looking to update their web application deployed on AWS Lambda and API Gateway. They want to introduce a new feature but aim to reduce the risk of impacting all users at once if unforeseen issues arise. Which deployment strategy should they use to meet this requirement?

  • Recreate deployment strategy

  • Blue/Green deployment strategy

  • Canary deployment strategy

  • Rolling update strategy

Question 5 of 15

A company is looking to encrypt data at rest for their Amazon DynamoDB table, which contains sensitive information. They want to guarantee that the encryption does not affect the performance of their application. Which service should they use to accomplish this without managing server-side encryption themselves?

  • Force all connections to the DynamoDB table to use SSL/TLS

  • Enable Amazon DynamoDB's default encryption at rest using AWS managed keys

  • Implement client-side encryption before storing the data in the DynamoDB table

  • Create an IAM role with a policy that enforces encryption at rest

Question 6 of 15

After the deployment of a new feature, your web application starts experiencing unpredictable delays. During peak hours, the system struggles to maintain optimal performance. To address the issue, you consult the service map from AWS X-Ray and notice increased latency in the communication between a serverless computing service and a managed relational database. What should this observation prompt you to investigate further?

  • Review the execution role associated with the serverless function for possible misconfigurations or insufficient permissions leading to latency.

  • Analyze the performance of the managed database, checking for suboptimal queries or resource limitations, and consider enhancements or scaling.

  • Inspect network configurations, since a misconfiguration in network Access Control Lists (ACLs) or security groups might lead to increased response times.

  • Check for any recent updates to the SDK in the serverless function that could be incompatible with the managed database communication protocols.

Question 7 of 15

A developer is creating a Lambda function that will be interacting with an Amazon RDS instance. The Lambda function should not store the database credentials in the code, and the credentials might change periodically. The developer wishes to securely manage these credentials and ensure that they can be updated without redeploying the Lambda function. What is the MOST appropriate way to manage the database credentials?

  • Retrieve the database credentials from AWS Secrets Manager at the start of the Lambda function's execution.

  • Embed the database credentials in the Lambda function's code and update the code when credentials change.

  • Store the database credentials as environment variables within the Lambda function's configuration.

  • Use AWS Systems Manager Parameter Store to manually rotate and update the database credentials.

Question 8 of 15

A software development team is implementing a set of microservices that will be exposed to their clients through endpoints. They are looking to adopt best practices for testing newly developed features without affecting the live production environment accessed by their customers. What is the most effective method to achieve this within the service that provides the endpoints?

  • Reuse the production endpoints for testing by applying request filtering based on a custom header to differentiate traffic

  • Generate a clone of the existing production environment and make code changes directly there to validate new features

  • Create a new deployment stage with specific configurations for the microservices that are separate from production settings

  • Implement feature toggles in the production codebase to switch between production and development configurations

Question 9 of 15

An application running on an EC2 instance needs to securely interact with various cloud resources. To follow best security practices, you've assigned a particular role to the instance to facilitate this. Which method should your application use to authenticate service requests seamlessly?

  • Generate and use a dedicated set of long-term security credentials, storing them in the instance storage for service requests.

  • Embed a fixed set of security credentials within the application's source code to authenticate service requests.

  • Implement a custom script to fetch temporary security tokens using GetSessionToken for service request authorization.

  • Rely on the cloud SDK's default behavior to retrieve temporary security credentials provided through the instance's metadata.

Question 10 of 15

Your team is working on an application with several serverless functions that require the same third-party libraries. To reduce redundancy and streamline the function update process, what method should be adopted to handle these shared resources?

  • Incorporate the required libraries into the zipped deployment archive for each individual function.

  • Employ Layers for the shared third-party libraries, enabling their reuse across functions without redundancy.

  • Instruct the development team to rebuild the application’s infrastructure whenever a library update is needed.

  • Configure a management service intended for dynamic configuration to handle the shared library versions.

Question 11 of 15

A development team is looking to manage environment-specific settings for their e-commerce web service interface, which routes incoming requests to the same backend AWS Lambda functions. They want to ensure that while the Lambda codebase remains identical, the behavior can be customized based on the environment it's deployed in. How should the team achieve this distinction within the web service interface provided by AWS?

  • Alter the backend function code to incorporate environment-specific logic, and bundle this variance within the function deployment package.

  • Utilize environment configuration parameters, unique to each deployment stage of the web service interface, to pass specific values to the backend without changing the functions.

  • Establish distinct backend functions for each deployment stage to manage the configuration differences, and allocate them to the web service interface accordingly.

  • Introduce separate interface methods distinguished by the intended environment to control the routing of requests.

Question 12 of 15

Your application uses an Amazon DynamoDB table to serve user profile information. You notice an increase in the read load causing throttling issues due to repeated accesses to the same items. Which caching strategy should you implement to minimize read latency and reduce the load on the DynamoDB table while ensuring data consistency for frequently accessed items?

  • Implement a read-through cache using Amazon ElastiCache

  • Store user profiles in Amazon S3 and synchronize them with DynamoDB

  • Increase the read capacity units (RCUs) for the DynamoDB table to handle the higher load

  • Apply lazy loading to load user profiles into the cache only when updates occur

  • Use a write-through cache to preload user profiles into Amazon ElastiCache

  • Set a time-to-live (TTL) for user profiles to invalidate the cache periodically

Question 13 of 15

To minimize disruptions when integrating a new virtual server that requires a specific pre-configured server image into an AWS environment, what is the best practice when altering an existing CloudFormation template?

  • Incorporate a new mapping in the Mappings section to associate all virtual server resource types with the new server image.

  • Directly adjust the existing resource definitions that provision virtual servers to reference the new server image.

  • Implement a condition in the Conditions section to trigger the creation of a new virtual server instance upon template update execution.

  • Introduce a new resource definition within the Resources section, specifying the required server image through its properties.

Question 14 of 15

To verify the accuracy of a function tasked with handling file processing and database updates, which practice should a developer employ to simulate interactions with the storage and database services during automated tests?

  • Create various branches and aliases for the function to segregate operational environments during the testing phase.

  • Implement a strategy for stepping through the function code with a debugger to inspect the file processing and updates.

  • Incorporate a mocking framework to replicate the behavior of file storage and managed database services within the test suite.

  • Generate live instances of file storage and managed database services and execute test cases against them.

Question 15 of 15

A developer has written a Lambda function to process incoming user profile updates and wants to track the number of failed update attempts due to validation errors. They need to create a custom metric for this purpose and report it using Amazon CloudWatch. Which approach should the developer use to implement this requirement?

  • Emit logs in the CloudWatch embedded metric format (EMF) from the Lambda function for every failed validation attempt.

  • Implement AWS X-Ray tracing in the Lambda function and filter the trace data to count the validation errors.

  • Use the AWS SDK in the Lambda function to put a custom metric by calling the CloudWatch PutMetricData API when a validation error occurs.

  • Create a new CloudWatch Logs log stream and write an error message with a specific format for every failed validation attempt.