AWS Certified Developer Associate Practice Test (DVA-C02)
Use the form below to configure your AWS Certified Developer Associate Practice Test (DVA-C02). The practice test can be configured to only include certain exam objectives and domains. You can choose between 5-100 questions and set a time limit.

AWS Certified Developer Associate DVA-C02 Information
AWS Certified Developer - Associate showcases knowledge and understanding of core AWS services, uses, and basic AWS architecture best practices, and proficiency in developing, deploying, and debugging cloud-based applications by using AWS. Preparing for and attaining this certification gives certified individuals more confidence and credibility. Organizations with AWS Certified developers have the assurance of having the right talent to give them a competitive advantage and ensure stakeholder and customer satisfaction.
The AWS Certified Developer - Associate (DVA-C02) exam is intended for individuals who perform a developer role. The exam validates a candidate’s ability to demonstrate proficiency in developing, testing, deploying, and debugging AWS Cloud-based applications. The exam also validates a candidate’s ability to complete the following tasks:
- Develop and optimize applications on AWS.
- Package and deploy by using continuous integration and continuous delivery (CI/CD) workflows.
- Secure application code and data.
- Identify and resolve application issues.
Scroll down to see your responses and detailed results
Free AWS Certified Developer Associate DVA-C02 Practice Test
Press start when you are ready, or press Change to modify any settings for the practice test.
- Questions: 15
- Time: Unlimited
- Included Topics:Development with AWS ServicesSecurityDeploymentTroubleshooting and Optimization
Which service offers automated code reviews and actionable recommendations for improving code quality, along with identifying sections of code that might expose security vulnerabilities?
CodeGuru
CloudFormation
Config
CloudTrail
Answer Description
The correct service is designed to automate code reviews and provide recommendations for enhancing code quality, including identifying security vulnerabilities. The other options listed are services that serve different purposes: orchestration of resource creation, tracking resource configurations and changes, and logging API activity across an account respectively.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What exactly is AWS CodeGuru?
How does CodeGuru identify security vulnerabilities?
Can you explain the difference between CodeGuru and the other listed services?
A development team must secure sensitive customer files in cloud-based object storage. The requirements stipulate that the encryption keys used should be under the company's direct control, with an automated process for changing these keys periodically. Which service and configuration would best fulfill these criteria?
Adopt a hardware security module service for key storage and institute a manual rotation process
Enable a managed key rotation service within the platform's cloud object storage
Engage a private certificate authority to apply server-side encryption policies to the cloud storage
Use self-managed keys in Key Management Service set to automatically rotate for object storage server-side encryption
Answer Description
The appropriate service for the creation and administration of encryption keys in the cloud is Key Management Service (KMS), which provides options to both create your own encryption keys and configure them for automatic rotation. Utilizing KMS keys offers the capability to fulfill the need for encryption at rest within S3 while also adhering to the company's guidelines for regular key rotation. The reliance on the platform's own managed keys would preclude direct control and rotation management. Certificate Manager's primary use case involves issuing certificates for TLS, not storage encryption, while CloudHSM is tailored for specific compliance requirements and does not innately manage automatic key rotation.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is Key Management Service (KMS) in AWS?
How does automated key rotation work in AWS KMS?
Why is self-managed key rotation preferable for sensitive data?
A development team is building a serverless application that uses AWS Lambda. To shorten the feedback loop, the team wants to run and debug the Lambda functions on their local machines without deploying the code to AWS after every change. Which AWS tool provides a local environment that emulates the Lambda runtime and lets the team invoke and debug functions locally?
AWS CloudFormation CLI
AWS CodeDeploy agent
AWS Serverless Application Model (AWS SAM) CLI
AWS Artifact
Answer Description
The AWS Serverless Application Model (AWS SAM) CLI can run Lambda functions inside Docker containers that replicate the AWS Lambda execution environment. Developers can use commands such as sam local invoke
and sam local start-api
to test and debug code locally, saving time and avoiding deployment costs. The other options do not provide local Lambda emulation.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What tools can I use for local testing of serverless applications?
What are Lambda functions and how do they fit into serverless architecture?
What are the benefits of local testing versus cloud testing in serverless application development?
Which service allows for the automatic rotation of secrets without human intervention while also enabling seamless integration with RDS databases?
AWS Identity and Access Management (IAM) roles
AWS Secrets Manager
AWS Systems Manager Parameter Store
Amazon S3 server-side encryption
Answer Description
AWS Secrets Manager supports the automatic rotation of secrets - a feature that benefits the security of application environments by regularly changing secret values. It also integrates with RDS databases, allowing the use of Lambda functions to define custom rotation strategies without causing downtime. The other options are either not designed for secrets management or do not provide the same level of automation and integration capabilities.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is AWS Secrets Manager and how does it work?
What are the advantages of using automated secret rotation?
How does AWS Secrets Manager integrate with RDS databases?
Which service provides a secure, scalable, and managed source control repository that supports private Git repositories and integrates with other continuous integration/continuous delivery (CI/CD) services?
CodeCommit
CodePipeline
Elastic Container Registry (ECR)
CodeBuild
Answer Description
CodeCommit is the correct answer because it is designed to securely store and version your code in the cloud, supporting the collaboration of multiple developers with private Git repositories. While CodePipeline does integrate with source control services, it primarily serves as a continuous delivery service to automate the release process, but does not store code. CodeBuild compiles source code, runs tests, and produces software packages, but does not manage source control repositories. Lastly, Elastic Container Registry (ECR) is a Docker container registry service used for storing, managing, and deploying Docker container images, and is not used for version controlling source code.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What are the key features of AWS CodeCommit?
How does AWS CodeCommit integrate with CI/CD practices?
What is the difference between AWS CodeCommit and GitHub?
Following the deployment of a new release, your team encounters severe issues that adversely affect the customer experience. The deployment strategy employed separates the old and new environments, allowing for independent operation and immediate traffic switching between the two. To mitigate these issues swiftly, what is the BEST course of action to revert to the previous, stable release?
Redeploy the prior release as a new operation within the deployment service.
Utilize function versioning and aliasing to revert the service to the prior stable codebase.
Create a fresh environment using the last stable release configuration and direct traffic there.
Switch production traffic to the environment running the last stable release using the console of the deployment service.
Answer Description
The most efficient way to revert to the previous stable release under the described deployment strategy is to switch the production traffic back to the older environment that's still operational with the last stable release. This action provides the quickest rollback with minimal downtime. Redeploying the previous release or setting up a new environment can introduce delays or further complications. Using function versions and aliases is not applicable to the described scenario, which implies a non-serverless environment.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What does it mean to switch production traffic back to the older environment?
What are deployment strategies, and why are they important?
What constitutes a stable release in deployment terms?
An application you are developing is responsible for processing messages from a queue and executing an operation that relies on a third-party service, which is known for its occasional unpredictability. To improve your application's robustness against these intermittent service failures, which pattern should you implement in your operation logic?
Increase read and write capacity to the queue during peak times
Retries with exponential backoff and jitter
Implement a circuit breaker to immediately halt operations upon an error
Attempt immediate recursive retries after a failed operation
Answer Description
In the scenario given, a third-party service that is intermittently unavailable would benefit from implementing retries with exponential backoff and jitter. The exponential backoff method systematically increases the wait time between retries after a failed attempt to call the third-party service. Adding jitter reduces the probability that multiple instances of your application will attempt to retry at the same moment, avoiding simultaneous retries that can lead to the 'thundering herd' problem when the service recovers. This can be particularly useful for distributed systems that rely on external services to ensure they can continue to operate effectively during transient outages. Using a circuit breaker does address an unreliable service, but the question specifically asks for a pattern that involves retry logic. Increasing read and write capacity or immediate recursive retries do not address the underlying issue of the service's unpredictability and may worsen it by potentially overloading the service when it comes back online.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is exponential backoff and how does it work?
What is jitter and why is it important in retry logic?
What is the difference between a circuit breaker and retry logic?
Your team is responsible for a critical online platform. During the next update, it is imperative to ensure that there is no interruption to the service. How would you perform this update to meet the business requirement of zero downtime?
Utilize an environment management service with blue/green deployment capability
Manage serverless compute resources using alias and version control
Utilize a deployment service with an in-place deployment option
Configure scaling and lifecycle policies for compute instances
Answer Description
Implementing a blue/green deployment permits the switch from a current version of the application to a new one without any downtime by routing traffic between two identical environments that are running different versions of the application. This ensures that the live version is untouched until the new one is ready, allowing quick rollbacks if required. Using alias and version management in serverless compute environments does not inherently assure zero downtime for web applications. Configuration of instance scaling is targeted towards resource optimization rather than deployment strategies. An in-place deployment updates the existing environment, which naturally involves a period of downtime.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is blue/green deployment?
How does traffic routing work in blue/green deployments?
What are the risks of in-place deployments compared to blue/green deployments?
What service allows developers to add annotations to their application traces in order to facilitate detailed monitoring and troubleshooting?
AWS Lambda
Amazon Inspector
AWS Elastic Beanstalk
Amazon CloudWatch Logs
Amazon CloudFront
AWS X-Ray
Answer Description
AWS X-Ray is a service that helps developers analyze and debug distributed applications, such as those built using a microservices architecture. One of its features is the ability to add annotations to traces. Annotations are key-value pairs that provide additional details about the work done by a service, such as the method's inputs and outputs or any relevant state information. Knowing how to use AWS X-Ray to add annotations is crucial as it enables efficient root cause analysis when troubleshooting issues.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What are annotations in AWS X-Ray and how do they help with troubleshooting?
How does AWS X-Ray differ from Amazon CloudWatch Logs in monitoring applications?
What types of applications benefit most from using AWS X-Ray?
An organization is deploying a serverless application using AWS Lambda that requires connectivity to a proprietary database. It is crucial to ensure that the database credentials are neither embedded in the application's codebase nor exposed in any configuration files. As the developer for this project, which approach should you employ to most securely handle the credentials and facilitate their automatic rotation?
Store the credentials in AWS Secrets Manager and grant the Lambda function's execution role permission to retrieve them at runtime.
Embed the database credentials directly within the application's source code for simplicity.
Store the database credentials as environment variables within the Lambda function's configuration.
Use AWS Systems Manager Parameter Store to store the credentials as SecureString parameters.
Answer Description
The correct solution is to use AWS Secrets Manager. This service is specifically designed for securely storing, managing, and retrieving secrets like database credentials, and it offers native support for automatic credential rotation for supported databases like Amazon RDS. Storing sensitive data in Lambda environment variables is not recommended as they can be inadvertently exposed in logs or accessed by compromised dependencies. Embedding credentials in source code is a major security risk and should always be avoided. While AWS Systems Manager Parameter Store can store credentials as SecureString parameters, it does not offer the same built-in, automated rotation capabilities as Secrets Manager, making Secrets Manager the superior choice for this use case.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is a secret management service and how does it work?
What are the risks of embedding credentials in environment variables?
What features should I look for in a secret management service?
When designing an effective logging strategy for an application running on AWS, what is the primary reason to include meaningful custom log messages at various points in the application code?
To satisfy compliance requirements for minimum logging verbosity.
To make the application run faster by reducing computational overhead.
To detail the application's behavior and state for better clarity during debugging and monitoring.
To ensure that application logs consume less storage space by having fewer log entries.
Answer Description
Including meaningful custom log messages at various points in the application code allows developers and operators to understand the application's behavior and state, which is essential for diagnosing issues and optimizing performance. It provides context that can make debugging and monitoring more effective by shining a light on the application's internal processes at critical moments.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
Why is it important to have meaningful custom log messages?
What are best practices for writing custom log messages?
How does logging contribute to application performance optimization?
Your application running on AWS Lambda is designed to process transactions and write logs to Amazon CloudWatch. You have noticed that the logs are difficult to search through when troubleshooting issues due to inconsistent formatting. To improve this, you decide to implement structured logging. Which approach would ensure that your logs are consistent and easily queryable?
Use plain text logs with clear and consistent prefixes for each line.
Log the output as comma-separated values (CSV) with consistent ordering of information for each entry.
Adopt XML formatted logs, where each entry is structured with relevant data tags.
Format all log entries as JSON with consistent key-value pairs for each type of log message.
Answer Description
Using JSON format for logs would ensure that each log entry is consistent and can be easily parsed and queried. JSON is a widely-known format which can be directly used with services like Amazon CloudWatch Logs Insights to run complex queries. By contrast, CSV lacks a self-describing format and the absence of keys can make it harder to interpret. Plain text logs lack structured data, making them difficult to query programmatically. Although XML is also structured, it is more verbose and not as readily queryable within AWS services as JSON.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is structured logging and why is it important?
Why is JSON preferred over CSV or plain text for logging in AWS?
Can you explain how Amazon CloudWatch Logs Insights works with structured logs?
A developer is working on enhancing the security of a serverless infrastructure where user authentication is handled by an OIDC-compliant external identity provider. Upon a user's successful sign-in, the external service issues a token. The developer needs to ensure that this token is validated before allowing access to the serverless function endpoint. Which approach should the developer implement to enforce token validation?
Apply a resource-based policy directly on the function to check for the presence of the token in the request.
Configure a role with specified permissions that authenticates users based on the provided token.
Utilize a Lambda function programmed to evaluate and verify the token before proceeding with the request.
Deploy client-side certificates to secure the endpoint and validate the incoming tokens.
Answer Description
The developer should implement a Lambda authorizer, which is a way to handle custom authorization logic before granting access to the serverless function endpoint. The Lambda authorizer can verify the validity of the token and determine if the request should be allowed or denied. This approach is particularly useful in serverless architectures where application components are loosely coupled, and an external identity provider manages user authentication. This verification is performed within the AWS environment without making a round trip to the external identity provider. On the contrary, IAM roles are for access management within AWS services and resources, not for validating tokens directly. Resource-based policies define permissions for AWS resources, but they do not provide a method for validating bearer tokens. Client-side certificates are used for mutual TLS (mTLS) authentication but do not apply to the scenario involving verification of tokens provided by an external identity provider.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is an OIDC-compliant identity provider?
How does a Lambda authorizer work for token validation?
What are JWT tokens, and why are they important?
An application you are developing requires that end-users authenticate using their existing social media accounts. Once authenticated, the application should grant temporary permissions to utilize certain cloud resources. Which service allows you to create an identity pool that facilitates this scenario, mapping social media identities to predefined roles for navigating and interacting with your cloud environment?
IAM with SAML 2.0
Cognito user pools without identity pools
Secrets Manager with IAM roles
Amazon Cognito with identity pools
Answer Description
Amazon Cognito with identity pools allows you to grant your users temporary, limited-privilege credentials to access AWS resources. This service can federate with external identity providers like social media platforms and corporate directories, exchanging their authentication tokens for temporary permissions in your environment. While Amazon Cognito user pools handle user management and authentication, they do not support direct federation for resource access. The IAM service is responsible for defining roles and permissions but does not handle direct identity federation. Similarly, STS is used for granting temporary credentials but is not directly responsible for federating with identity providers in the context of your application's users.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is Amazon Cognito and how does it work?
What are identity pools and how do they differ from user pools in Amazon Cognito?
How does federated authentication work with Amazon Cognito?
Your company's web application, hosted on AWS Elastic Beanstalk, is suddenly returning an error code to the clients when they try to access a particular endpoint. Users are getting a response that indicates the server understood the request but refuses to authorize it. As a developer, you need to determine which HTTP error code is being returned. What is the most likely HTTP status code the application is generating?
403 Forbidden
404 Not Found
500 Internal Server Error
401 Unauthorized
Answer Description
The HTTP status code 403 Forbidden is returned by a server to indicate that the request was valid, but the server is refusing action. The server understands the request, but it won't fulfill it due to client-side issues, such as insufficient permissions. A 401 Unauthorized error code would imply that proper authentication is required and has either not been provided or is being denied; this scenario did not specifically mention an issue with authentication credentials. Conversely, a 404 Not Found would suggest the requested resource could not be found, and a 500 Internal Server Error would imply a server-side error, which does not fit the description of understanding but refusing the request.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What does the HTTP status code 403 Forbidden mean in more detail?
How does 401 Unauthorized differ from 403 Forbidden?
What types of issues could lead to a 403 Forbidden status code?
Nice!
Looks like that's it! You can go back and review your answers or click the button below to grade your test.