Free DVA-C02 Sample Questions — AWS Certified Developer - Associate DVA-C02

Free DVA-C02 sample questions for the AWS Certified Developer - Associate DVA-C02 exam. No account required: study at your own pace.

Want an interactive quiz? Take the full DVA-C02 practice test

Looking for more? Click here to get the full PDF with 488+ practice questions for $10 for offline study and deeper preparation.

Question 1

A company is adopting serverless computing for some of its new services. A development team needs to create a serverless infrastructure by using AWS Serverless Application Model (AWS SAM). All infrastructure must be deployed by using AWS CloudFormation templates. What should the development team do to meet these requirements?

  • A. Add a Resources section to the CloudFormation templates that contains AWS::Lambda::Function resources
  • B. Add a Mappings section to the CloudFormation templates that contains AWS::Serverless::Function and AWS::Serverless::API
  • C. Add a Transform section to the CloudFormation templates. Use the AWS SAM syntax to define the resources
  • D. Add a Parameters section to the CloudFormation templates that specifies the relevant AWS SAM Globals section
Show Answer
Correct Answer:
C. Add a Transform section to the CloudFormation templates. Use the AWS SAM syntax to define the resources
Question 2

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
Show Answer
Correct Answer:
B. Implement a write-through strategy for every item that is created and updated
Question 3

A company introduced a new feature that should be accessible to only a specific group of premium customers. A developer needs the ability to turn the feature on and off in response to performance and feedback. The developer needs a solution to validate and deploy these configurations quickly without causing any disruptions. What should the developer do to meet these requirements?

  • A. Use AWS AppConfig to manage the feature configuration and to validate and deploy changes. Use feature flags to turn the feature on and off
  • B. Use AWS Secrets Manager to securely manage and validate the feature configurations. Enable lifecycle rules to turn the feature on and off
  • C. Use AWS Config to manage the feature configuration and validation. Set up AWS Config rules to turn the feature on and off based on predefined conditions
  • D. Use AWS Systems Manager Parameter Store to store and validate the configuration settings for the feature. Enable lifecycle rules to turn the feature on and off
Show Answer
Correct Answer:
A. Use AWS AppConfig to manage the feature configuration and to validate and deploy changes. Use feature flags to turn the feature on and off
Question 4

A developer updates an AWS Lambda function that an Amazon API Gateway API uses. The API is the backend for a web application. The developer needs to test the updated Lambda function before deploying the Lambda function to production. The testing must not affect any production users of the web application. Which solution will meet these requirements in the MOST operationally efficient way?

  • A. Create a canary release deployment for the existing API stage. Deploy the API to the existing stage. Test the updated Lambda function by using the existing URL
  • B. Update the API Gateway API endpoint type to private. Deploy the changes to the existing API stage. Test the API by using the existing URL
  • C. Create a new test API stage in API Gateway. Add stage variables to deploy the updated Lambda function to only the test stage. Test the updated Lambda function by using the new stage URL
  • D. Create a new AWS CloudFormation stack to deploy a copy of the entire production API and Lambda function. Use the stack's API URL to test the updated Lambda function
Show Answer
Correct Answer:
C. Create a new test API stage in API Gateway. Add stage variables to deploy the updated Lambda function to only the test stage. Test the updated Lambda function by using the new stage URL
Question 5

A developer is building an application that will use an Amazon API Gateway API with an AWS Lambda backend. The team that will develop the frontend requires immediate access to the API endpoints to build the UI. To prepare the backend application for integration, the developer needs to set up endpoints. The endpoints need to return predefined HTTP status codes and JSON responses for the frontend team. The developer creates a method for an API resource. Which solution will meet these requirements?

  • A. Set the integration type to AWS_PROXY. Provision Lambda functions to return hardcoded JSON data
  • B. Set the integration type to MOCK. Configure the method's integration request and integration response to associate a JSON responses with specific HTTP status codes
  • C. Set the integration type to HTTP_PROXY. Configure API Gateway to pass all requests to an external placeholder API. which the team will build
  • D. Set the integration type to MOCK. Use a method request to define HTTP status codes. Use an integration request to define JSON responses
Show Answer
Correct Answer:
B. Set the integration type to MOCK. Configure the method's integration request and integration response to associate a JSON responses with specific HTTP status codes
Question 6

A developer has built a market application that stores pricing data in Amazon DynamoDB with Amazon ElastiCache in front. The prices of items in the market change frequently. Sellers have begun complaining that, after they update the price of an item, the price does not actually change in the product listing. What could be causing this issue?

  • A. The cache is not being invalidated when the price of the item is changed
  • B. The price of the item is being retrieved using a write-through ElastiCache cluster
  • C. The DynamoDB table was provisioned with insufficient read capacity
  • D. The DynamoDB table was provisioned with insufficient write capacity
Show Answer
Correct Answer:
A. The cache is not being invalidated when the price of the item is changed
Question 7

An ecommerce startup is preparing for an annual sales event. As the traffic to the company's application increases, the development team wants to be notified when the Amazon EC2 instance's CPU utilization exceeds 80%. Which solution will meet this requirement?

  • A. Create a custom Amazon CloudWatch alarm that sends a notification to an Amazon SNS topic when the CPU utilization exceeds 80%
  • B. Create a custom AWS CloudTrail alarm that sends a notification to an Amazon SNS topic when the CPU utilization exceeds 80%
  • C. Create a cron job on the EC2 instance that invokes the --describe-instance-information command on the host instance every 15 minutes and sends the results to an Amazon SNS topic
  • D. Create an AWS Lambda function that queries the AWS CloudTrail logs for the CPUUtilization metric every 15 minutes and sends a notification to an Amazon SNS topic when the CPU utilization exceeds 80%
Show Answer
Correct Answer:
A. Create a custom Amazon CloudWatch alarm that sends a notification to an Amazon SNS topic when the CPU utilization exceeds 80%
Question 8

An Amazon Data Firehose delivery stream is receiving customer data that contains personally identifiable information. A developer needs to remove pattern-based customer identifiers from the data and store the modified data in an Amazon S3 bucket. What should the developer do to meet these requirements?

  • A. Implement Firehose data transformation as an AWS Lambda function. Configure the function to remove the customer identifiers. Set an Amazon S3 bucket as the destination of the delivery stream
  • B. Launch an Amazon EC2 instance. Set the EC2 instance as the destination of the delivery stream. Run an application on the EC2 instance to remove the customer identifiers. Store the transformed data in an Amazon S3 bucket
  • C. Create an Amazon OpenSearch Service instance. Set the OpenSearch Service instance as the destination of the delivery stream. Use search and replace to remove the customer identifiers. Export the data to an Amazon S3 bucket
  • D. Create an AWS Step Functions workflow to remove the customer identifiers. As the last step in the workflow, store the transformed data in an Amazon S3 bucket. Set the workflow as the destination of the delivery stream
Show Answer
Correct Answer:
A. Implement Firehose data transformation as an AWS Lambda function. Configure the function to remove the customer identifiers. Set an Amazon S3 bucket as the destination of the delivery stream
Question 9

A company wants to test its web application more frequently. The company deploys the application by using a separate AWS CloudFormation stack for each environment. The company deploys the same CloudFormation template to each stack as the application progresses through the development lifecycle. A developer needs to build in notifications for the quality assurance (QA) team. The developer wants the notifications to occur for new deployments in the final preproduction environment. Which solution will meet these requirements?

  • A. Create an Amazon Simple Notification Service (Amazon SNS) topic. Subscribe the QA team to the Amazon SNS topic. Update the CloudFormation stack options to point to the SNS topic in the pre-production environment
  • B. Create an AWS Lambda function that notifies the QA team. Create an Amazon EventBridge rule to invoke the Lambda function on the default event bus. Filter the events on the CloudFormation service and on the CloudFormation stack Amazon Resource Name (ARN)
  • C. Create an Amazon CloudWatch alarm that monitors the metrics from CloudFormation. Filter the metrics on the stack name and the stack status. Configure the CloudWatch alarm to notify the QA team
  • D. Create an AWS Lambda function that notifies the QA team. Configure the event source mapping to receive events from CloudFormation. Specify the filtering values to limit invocations to the desired CloudFormation stack
Show Answer
Correct Answer:
A. Create an Amazon Simple Notification Service (Amazon SNS) topic. Subscribe the QA team to the Amazon SNS topic. Update the CloudFormation stack options to point to the SNS topic in the pre-production environment
Question 10

A developer is creating a solution to track an account's Amazon S3 buckets over time. The developer has created an AWS Lambda function that will run on a schedule. The function will list the account's S3 buckets and will store the list in an Amazon DynamoDB table. The developer receives a permissions error when the developer runs the function with the AWSLambdaBasicExecutionRole AWS managed policy. Which combination of permissions should the developer use to resolve this error? (Choose two.)

  • A. Cross-account IAM role
  • B. Permission for the Lambda function to list buckets in Amazon S3
  • C. Permission for the Lambda function to write in DynamoDB
  • D. Permission for Amazon S3 to invoke the Lambda function
  • E. Permission for DynamoDB to invoke the Lambda function
Show Answer
Correct Answer:
  • B. Permission for the Lambda function to list buckets in Amazon S3
  • C. Permission for the Lambda function to write in DynamoDB
Question 11

A developer is storing many objects in a single Amazon S3 bucket. The developer needs to optimize the S3 bucket for high request rates. How should the developer store the objects to meet this requirement?

  • A. Store the objects by using S3 Intelligent-Tiering
  • B. Store the objects at the root of the S3 bucket
  • C. Store the objects by using object key names distributed across multiple prefixes
  • D. Store each object with an object tag named "prefix" that contains a unique value
Show Answer
Correct Answer:
C. Store the objects by using object key names distributed across multiple prefixes
Question 12

A company is creating an application that processes .csv files from Amazon S3. A developer has created an S3 bucket. The developer has also created an AWS Lambda function to process the .csv files from the S3 bucket. Which combination of steps will invoke the Lambda function when a .csv file is uploaded to Amazon S3? (Choose two.)

  • A. Create an Amazon EventBridge rule. Configure the rule with a pattern to match the S3 object created event
  • B. Schedule an Amazon EventBridge rule to run a new Lambda function to scan the S3 bucket
  • C. Add a trigger to the existing Lambda function. Set the trigger type to EventBridge. Select the Amazon EventBridge rule
  • D. Create a new Lambda function to scan the S3 bucket for recently added S3 objects
  • E. Add S3 Lifecycle rules to invoke the existing Lambda function
Show Answer
Correct Answer:
  • A. Create an Amazon EventBridge rule. Configure the rule with a pattern to match the S3 object created event
  • C. Add a trigger to the existing Lambda function. Set the trigger type to EventBridge. Select the Amazon EventBridge rule
Question 13

A developer has an application that uses an Amazon DynamoDB table with a configured local secondary index (LSI). During application testing, the DynamoDB table metrics report a ProvisionedThroughputExceededException error message. The number of requests made by the test suite did not exceed the table's provisioned capacity limits. What is the cause of this issue?

  • A. The data in the table's partition key column is not evenly distributed
  • B. The LSI's capacity is different from the table's capacity
  • C. The application is not implementing exponential backoff retry logic while interacting with the DynamoDB API
  • D. The application has the IAM permission to query the DynamoDB table but not to query the LSI
Show Answer
Correct Answer:
A. The data in the table's partition key column is not evenly distributed
Question 14

A company has an application that is hosted on Amazon EC2 instances. The application stores objects in an Amazon S3 bucket and allows users to download objects from the S3 bucket. A developer turns on S3 Block Public Access for the S3 bucket. After this change, users report errors when they attempt to download objects. The developer needs to implement a solution so that only users who are signed in to the application can access objects in the S3 bucket. Which combination of steps will meet these requirements in the MOST secure way? (Choose two.)

  • A. Create an EC2 instance profile and role with an appropriate policy. Associate the role with the EC2 instances
  • B. Create an IAM user with an appropriate policy. Store the access key ID and secret access key on the EC2 instances
  • C. Modify the application to use the S3 GeneratePresignedUrl API call
  • D. Modify the application to use the S3 GetObject API call and to return the object handle to the user
  • E. Modify the application to delegate requests to the S3 bucket
Show Answer
Correct Answer:
  • A. Create an EC2 instance profile and role with an appropriate policy. Associate the role with the EC2 instances
  • C. Modify the application to use the S3 GeneratePresignedUrl API call
Question 15

A developer has been asked to create an AWS Lambda function that is invoked any time updates are made to items in an Amazon DynamoDB table. The function has been created, and appropriate permissions have been added to the Lambda execution role. Amazon DynamoDB streams have been enabled for the table, but the function is still not being invoked. Which option would enable DynamoDB table updates to invoke the Lambda function?

  • A. Change the StreamViewType parameter value to NEW_AND_OLD_IMAGES for the DynamoDB table
  • B. Configure event source mapping for the Lambda function
  • C. Map an Amazon Simple Notification Service (Amazon SNS) topic to the DynamoDB streams
  • D. Increase the maximum runtime (timeout) setting of the Lambda function
Show Answer
Correct Answer:
B. Configure event source mapping for the Lambda function
Question 16

A development team wants to immediately build and deploy an application whenever there is a change to the source code. Which approaches could be used to trigger the deployment? (Choose two.)

  • A. Store the source code in an Amazon S3 bucket. Configure AWS CodePipeline to start whenever a file in the bucket changes
  • B. Store the source code in an encrypted Amazon EBS volume. Configure AWS CodePipeline to start whenever a file in the volume changes
  • C. Store the source code in an AWS CodeCommit repository. Configure AWS CodePipeline to start whenever a change is committed to the repository
  • D. Store the source code in an Amazon S3 bucket. Configure AWS CodePipeline to start every 15 minutes
  • E. Store the source code in an Amazon EC2 instance’s ephemeral storage. Configure the instance to start AWS CodePipeline whenever there are changes to the source code
Show Answer
Correct Answer:
  • A. Store the source code in an Amazon S3 bucket. Configure AWS CodePipeline to start whenever a file in the bucket changes
  • C. Store the source code in an AWS CodeCommit repository. Configure AWS CodePipeline to start whenever a change is committed to the repository
Question 17

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 IAM 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 IAM user access key and secret key
  • D. Install an AWS software development kit (SDK). Configure the SDK by using an X.509 certificate
Show Answer
Correct Answer:
C. Install the AWS CLI, Configure the AWS CLI by using an IAM user access key and secret key
Question 18

A company has an application that uses Amazon Cognito user pools as an identity provider. The company must secure access to user records. The company has set up multi-factor authentication (MFA). The company also wants to send a login activity notification by email every time a user logs in. What is the MOST operationally efficient solution that meets this requirement?

  • A. Create an AWS Lambda function that uses Amazon Simple Email Service (Amazon SES) to send the email notification. Add an Amazon API Gateway API to invoke the function. Call the API from the client side when login confirmation is received
  • B. Create an AWS Lambda function that uses Amazon Simple Email Service (Amazon SES) to send the email notification. Add an Amazon Cognito post authentication Lambda trigger for the function
  • C. Create an AWS Lambda function that uses Amazon Simple Email Service (Amazon SES) to send the email notification. Create an Amazon CloudWatch Logs log subscription filter to invoke the function based on the login status
  • D. Configure Amazon Cognito to stream all logs to Amazon Kinesis Data Firehose. Create an AWS Lambda function to process the streamed logs and to send the email notification based on the login status of each user
Show Answer
Correct Answer:
B. Create an AWS Lambda function that uses Amazon Simple Email Service (Amazon SES) to send the email notification. Add an Amazon Cognito post authentication Lambda trigger for the function
Question 19

A developer is making changes to a custom application that uses AWS Elastic Beanstalk. Which solutions will update the Elastic Beanstalk environment with the new application version after the developer completes the changes? (Choose two.)

  • A. Package the application code into a zip file. Use the AWS Management Console to upload the .zip file and deploy the packaged application
  • B. Package the application code into a .tar file. Use the AWS Management Console to create a new application version from the .tar file. Update the environment by using the AWS CLI
  • C. Package the application code into a .tar file. Use the AWS Management Console to upload the .tar file and deploy the packaged application
  • D. Package the application code into a .zip file. Use the AWS CL to create a new application version from the .zip file and to update the environment
  • E. Package the application code into a .zip file. Use the AWS Management Console to create a new application version from the .zip file. Rebuild the environment by using the AWS CLI
Show Answer
Correct Answer:
  • A. Package the application code into a zip file. Use the AWS Management Console to upload the .zip file and deploy the packaged application
  • D. Package the application code into a .zip file. Use the AWS CL to create a new application version from the .zip file and to update the environment
Question 20

A developer is building a serverless application that runs on AWS. The developer wants to create an accelerated development workflow that deploys incremental changes to AWS for testing. The developer wants to deploy the incremental changes but does not want to fully deploy the entire application to AWS for every code commit. What should the developer do to meet these requirements?

  • A. Use the AWS Serverless Application Model (AWS SAM) to build the application. Use the sam sync command to deploy the incremental changes
  • B. Use the AWS Serverless Application Model (AWS SAM) to build the application. Use the sam init command to deploy the incremental changes
  • C. Use the AWS Cloud Development Kit (AWS CDK) to build the application. Use the cdk synth command to deploy the incremental changes
  • D. Use the AWS Cloud Development Kit (AWS CDK) to build the application. Use the cdk bootstrap command to deploy the incremental changes
Show Answer
Correct Answer:
A. Use the AWS Serverless Application Model (AWS SAM) to build the application. Use the sam sync command to deploy the incremental changes

Aced these? Get the Full Exam

Download the complete DVA-C02 study bundle with 488+ questions in a single printable PDF.