Amazon DVA-C02 Online Practice
Questions and Exam Preparation
DVA-C02 Exam Details
Exam Code
:DVA-C02
Exam Name
:AWS Certified Developer - Associate (DVA-C02)
Certification
:Amazon Certifications
Vendor
:Amazon
Total Questions
:574 Q&As
Last Updated
:May 27, 2026
Amazon DVA-C02 Online Questions &
Answers
Question 491:
A developer is writing an application, which stores data in an Amazon DynamoDB table. The developer wants to query the DynamoDB table by using the partition key and a different sort key value. The developer needs the latest data with all recent write operations.
How should the developer write the DynamoDB query?
A. Add a local secondary index (LSI) during table creation. Query the LSI by using eventually consistent reads. B. Add a local secondary index (LSI) during table creation. Query the LSI by using strongly consistent reads. C. Add a global secondary index (GSI) during table creation. Query the GSI by using eventually consistent reads. D. Add a global secondary index (GSI) during table creation. Query the GSI by using strongly consistent reads.
B. Add a local secondary index (LSI) during table creation. Query the LSI by using strongly consistent reads.
Explanation
Local Secondary Index (LSI):
An LSI allows you to create an index with a different sort key for the same partition key as the base table. This lets you query the table using the same partition key but with a different sort key.
LSIs are created at the same time as the table and cannot be added to an existing table.
Strongly consistent reads ensure that you always receive the most up-to-date data after all previous write operations are acknowledged. This is important when the developer needs to ensure they are getting the latest data, as stated in the question.
Question 492:
A company is hosting a workshop for external users and wants to share the reference documents with the external users for 7 days. The company stores the reference documents in an Amazon S3 bucket that the company owns.
What is the MOST secure way to share the documents with the external users?
A. Use S3 presigned URLs to share the documents with the external users. Set an expiration time of 7 days. B. Move the documents to an Amazon WorkDocs folder. Share the links of the WorkDocs folder with the external users. C. Create temporary IAM users that have read-only access to the S3 bucket. Share the access keys with the external users. Expire the credentials after 7 days. D. Create a role that has read-only access to the S3 bucket. Share the Amazon Resource Name (ARN) of this role with the external users.
A. Use S3 presigned URLs to share the documents with the external users. Set an expiration time of 7 days.
Explanation
Question 493:
A company has an application that uses an AWS Lambda function to consume messages from an Amazon Simple Queue Service (Amazon SQS) queue. The SQS queue is configured with a dead-letter queue. Due to a defect in the application, AWS Lambda failed to process some messages. A developer fixed the bug and wants to process the failed messages again.
How should the developer resolve this issue?
A. Use the SendMessageBatch API to send messages from the dead-letter queue to the original SQS queue. B. Use the ChangeMessageVisibility API to configure messages in the dead-letter queue to be visible in the original SQS queue. C. Use the StartMessageMoveTask API to move messages from the dead-letter queue to the original SQS queue. D. Use the PurgeQueue API to remove messages from the dead-letter queue and return the messages to the original SQS queue.
A. Use the SendMessageBatch API to send messages from the dead-letter queue to the original SQS queue.
Explanation
Question 494:
A developer is designing a fault-tolerant environment where client sessions will be saved. How can the developer ensure that no sessions are lost if an Amazon EC2 instance fails?
A. Use sticky sessions with an Elastic Load Balancer target group. B. Use Amazon SQS to save session data. C. Use Amazon DynamoDB to perform scalable session handling. D. Use Elastic Load Balancer connection draining to stop sending requests to failing instances.
C. Use Amazon DynamoDB to perform scalable session handling.
Explanation
Question 495:
A company has a web application that is deployed on AWS. The application uses an Amazon API Gateway API and an AWS Lambda function as its backend.
The application recently demonstrated unexpected behavior. A developer examines the Lambda function code, finds an error, and modifies the code to resolve the problem. Before deploying the change to production, the developer needs to
run tests to validate that the application operates properly.
The application has only a production environment available. The developer must create a new development environment to test the code changes. The developer must also prevent other developers from overwriting these changes during the
test cycle.
Which combination of steps will meet these requirements with the LEAST development effort? (Choose two.)
A. Create a new resource in the current stage. Create a new method with Lambda proxy integration. Select the Lambda function. Add the hotfix alias. Redeploy the current stage. Test the backend. B. Update the Lambda function in the API Gateway API integration request to use the hotfix alias. Deploy the API Gateway API to a new stage named hotfix. Test the backend. C. Modify the Lambda function by fixing the code. Test the Lambda function. Create the alias hotfix. Point the alias to the $LATEST version. D. Modify the Lambda function by fixing the code. Test the Lambda function. When the Lambda function is working as expected, publish the Lambda function as a new version. Create the alias hotfix. Point the alias to the new version. E. Create a new API Gateway API for the development environment. Add a resource and method with Lambda integration. Choose the Lambda function and the hotfix alias. Deploy to a new stage. Test the backend.
B. Update the Lambda function in the API Gateway API integration request to use the hotfix alias. Deploy the API Gateway API to a new stage named hotfix. Test the backend. D. Modify the Lambda function by fixing the code. Test the Lambda function. When the Lambda function is working as expected, publish the Lambda function as a new version. Create the alias hotfix. Point the alias to the new version.
Explanation
Question 496:
A developer is using AWS Step Functions to automate a workflow. The workflow defines each step as an AWS Lambda function task. The developer notices that runs of the Step Functions state machine fail in the GetResource task with either an IllegalArgumentException error or a TooManyRequestsException error.
The developer wants the state machine to stop running when the state machine encounters an IllegalArgumentException error. The state machine needs to retry the GetResource task one additional time after 10 seconds if the state machine encounters a TooManyRequestsException error. If the second attempt fails, the developer wants the state machine to stop running.
How can the developer implement the Lambda retry functionality without adding unnecessary complexity to the state machine?
A. Add a Delay task after the GetResource task. Add a catcher to the GetResource task. Configure the catcher with an error type of TooManyRequestsException. Configure the next step to be the Delay task. Configure the Delay task to wait for an interval of 10 seconds. Configure the next step to be the GetResource task. B. Add a catcher to the GetResource task. Configure the catcher with an error type of TooManyRequestsException, an interval of 10 seconds, and a maximum attempts value of 1. Configure the next step to be the GetResource task. C. Add a retrier to the GetResource task. Configure the retrier with an error type of TooManyRequestsException, an interval of 10 seconds, and a maximum attempts value of 1. D. Duplicate the GetResource task. Rename the new GetResource task to TryAgain. Add a catcher to the original GetResource task. Configure the catcher with an error type of TooManyRequestsException. Configure the next step to be TryAgain.
C. Add a retrier to the GetResource task. Configure the retrier with an error type of TooManyRequestsException, an interval of 10 seconds, and a maximum attempts value of 1.
Explanation
The best way to implement the Lambda retry functionality is to use the Retry field in the state definition of the GetResource task. The Retry field allows the developer to specify an array of retriers, each with an error type, an interval, and a maximum number of attempts. By setting the error type to TooManyRequestsException, the interval to 10 seconds, and the maximum attempts to 1, the developer can achieve the desired behavior of retrying the GetResource task once after 10 seconds if it encounters a TooManyRequestsException error. If the retry fails, the state machine will stop running. If the GetResource task encounters an UlegalArgumentException error, the state machine will also stop running without retrying, as this error type is not specified in the Retry field. References Error handling in Step Functions Handling Errors, Retries, and adding Alerting to Step Function State Machine Executions The Jitter Strategy for Step Functions Error Retries on the New Workflow Studio
Question 497:
A developer received the following error message during an AWS CloudFormation deployment: DELETE_FAILED (The following resource(s) failed to delete: [ASGInstanceRole12345678].) Which action should the developer take to resolve this error?
A. Contact AWS Support to report an issue with the Auto Scaling Groups (ASG) service. B. Add a DependsOn attribute to the ASGInstanceRole12345678 resource in the CloudFormation template. Then delete the stack. C. Modify the CloudFormation template to retain the ASGInstanceRole12345678 resource. Then manually delete the resource after deployment. D. Add a force parameter when calling CloudFormation with the role-arn of ASGInstanceRole12345678.
C. Modify the CloudFormation template to retain the ASGInstanceRole12345678 resource. Then manually delete the resource after deployment.
Explanation
Question 498:
A company runs an application on AWS. The application uses an AWS Lambda function that is configured with an Amazon Simple Queue Service (Amazon SQS) queue called high priority queue as the event source. A developer is updating the Lambda function with another SQS queue called low priority queue as the event source. The Lambda function must always read up to 10 simultaneous messages from the high priority queue before processing messages from low priority queue. The Lambda function must be limited to 100 simultaneous invocations.
Which solution will meet these requirements?
A. Set the event source mapping batch size to 10 for the high priority queue and to 90 for the low priority queue B. Set the delivery delay to 0 seconds for the high priority queue and to 10 seconds for the low priority queue C. Set the event source mapping maximum concurrency to 10 for the high priority queue and to 90 for the low priority queue D. Set the event source mapping batch window to 10 for the high priority queue and to 90 for the low priority queue
C. Set the event source mapping maximum concurrency to 10 for the high priority queue and to 90 for the low priority queue
Explanation
Setting the event source mapping maximum concurrency is the best way to control how many messages from each queue are processed by the Lambda function at a time. The maximum concurrency setting limits the number of batches that can be processed concurrently from the same event source. By setting it to 10 for the high priority queue and to 90 for the low priority queue, the developer can ensure that the Lambda function always reads up to 10 simultaneous messages from the high priority queue before processing messages from the low priority queue, and that the total number of concurrent invocations does not exceed 100. The other solutions are either not effective or not relevant. The batch size setting controls how many messages are sent to the Lambda function in a single invocation, not how many invocations are allowed at a time. The delivery delay setting controls how long a message is invisible in the queue after it is sent, not how often it is processed by the Lambda function. The batch window setting controls how long the event source mapping can buffer messages before sending a batch, not how many batches are processed concurrently. References Using AWS Lambda with Amazon SQS AWS Lambda Event Source Mapping - Examples and best practices | Shisho Dojo Lambda event source mappings - AWS Lambda aws_lambda_event_source_mapping - Terraform Registry
Question 499:
An IAM role is attached to an Amazon EC2 instance that explicitly denies access to all Amazon S3 API actions. The EC2 instance credentials file specifies the IAM access key and secret access key, which allow full administrative access.
Given that multiple modes of IAM access are present for this EC2 instance, which of the following is correct?
A. The EC2 instance will only be able to list the S3 buckets. B. The EC2 instance will only be able to list the contents of one S3 bucket at a time. C. The EC2 instance will be able to perform all actions on any S3 bucket. D. The EC2 instance will not be able to perform any S3 action on any S3 bucket.
D. The EC2 instance will not be able to perform any S3 action on any S3 bucket.
Explanation
Question 500:
A bookstore has an ecommerce website that stores order information in an Amazon DynamoDB table named BookOrders. The DynamoDB table contains approximately one million records.
The table uses OrderID as a partition key. There are no other indexes.
A developer wants to build a new reporting feature to retrieve all records from the table for a specified customer, based on a CustomerID property.
A. Create a DynamoDB global secondary index (GSI) on the table. Use CustomerID as the partition key. Use the specified CustomerID value to run a query on the table. B. Create a DynamoDB global secondary index (GSI) on the table. Use CustomerID as the sort key. Use a filter expression to perform a scan operation on the table to match on the specified CustomerID value. C. Create a DynamoDB local secondary index (LSI) on the table. Use CustomerID as the sort key. Run a PartiQL query on the table with a SELECT statement where CustomerID equals the specified CustomerID value. D. Create a DynamoDB local secondary index (LSI) on the table. Use CustomerID as the partition key. Use the specified CustomerID value to run a query on the table.
A. Create a DynamoDB global secondary index (GSI) on the table. Use CustomerID as the partition key. Use the specified CustomerID value to run a query on the table.
Explanation
The requirement is to query records by CustomerID, which is not the current partition key (OrderID). To achieve this efficiently:
Option A: Create a GSI with CustomerID as the Partition Key:
A Global Secondary Index (GSI) allows developers to create a different partition key and optional sort key for querying the data. By creating a GSI with CustomerID as the partition key, the developer can query the table efficiently using
CustomerID as the primary lookup key.
This avoids scanning the entire table and matches the requirement.
Why Other Options Are Incorrect:
Option B: Using CustomerID as a sort key for the GSI and performing a scan operation is inefficient. Queries are optimized, but scans are not. Option C and D: Local Secondary Indexes (LSI) are only valid when the partition key remains the
same as the base table. Since OrderID is the base table's partition key, using CustomerID as the partition key or sort key in an LSI is not valid.
Nowadays, the certification exams become more and more important and required by more and more
enterprises when applying for a job. But how to prepare for the exam effectively? How to prepare
for the exam in a short time with less efforts? How to get a ideal result and how to find the
most reliable resources? Here on Vcedump.com, you will find all the answers.
Vcedump.com provide not only Amazon exam questions,
answers and explanations but also complete assistance on your exam preparation and certification
application. If you are confused on your DVA-C02 exam preparations
and Amazon certification application, do not hesitate to visit our
Vcedump.com to find your solutions here.