Amazon

DVA-C02 Free Practice Questions — Page 9

Question 81

A company is hosting an Amazon AP! Gateway REST API that calls a single AWS Lambda function. The function is infrequently invoked by multiple clients at the same time. The code performance is optimal, but the company wants to optimize the startup time of the function What can a developer do to optimize the initialization of the function?

A. Enable API Gateway caching for the REST API.
B. Configure provisioned concurrency for the Lambda function.
C. Use Lambda proxy integration for the REST API.
D. Configure AWS Global Accelerator for the Lambda function.
Show Answer
Correct Answer: B
Explanation:
Provisioned concurrency keeps Lambda execution environments pre-initialized, significantly reducing or eliminating cold-start initialization latency. API Gateway caching caches responses rather than Lambda startup, Lambda proxy integration changes request/response handling but not initialization time, and AWS Global Accelerator optimizes network routing rather than Lambda cold starts.

Question 82

A gaming company has deployed a web portal on AWS Elastic Beanstalk. The company sometimes needs to deploy new versions three or four times in a day. The company needs to deploy new features for all users as quickly as possible. The solution must minimize performance impact and must maximize availability. What solution will meet these requirements?

A. Use a rolling deployment policy to deploy to Amazon EC2 instances.
B. Use an immutable deployment policy to deploy to Amazon EC2 instances.
C. Use an all-at-once deployment policy to deploy to Amazon EC2 instances.
D. Use a-canary deployment strategy to deploy changes to Amazon EC2 instances.
Show Answer
Correct Answer: B
Explanation:
Immutable deployments launch a fresh Auto Scaling group of EC2 instances with the new application version while keeping the existing instances serving traffic. After the new instances pass health checks, Elastic Beanstalk switches over, maximizing availability and minimizing performance impact during deployment. Rolling deployments reduce capacity during updates, all-at-once causes downtime/performance impact, and canary is not an Elastic Beanstalk deployment policy for this requirement and intentionally delays rollout to all users.

Question 83

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
Explanation:
Amazon Data Firehose supports invoking an AWS Lambda function for in-flight data transformation before delivering records to the destination. A Lambda function can remove or mask pattern-based PII, and the transformed records can then be delivered directly to an Amazon S3 bucket. The other options are not supported Firehose transformation patterns or are unnecessarily complex.

Question 84

A company hosts applications on premises. The on-premises servers generate audit logs that are available through an HTTP endpoint. The company needs an automated solution to regularly ingest and store large volumes of audit data from the on-premises servers. The company also needs to perform queries on the audit data. Which solution will meet these requirements in the MOST operationally efficient way?

A. Export the audit logs. Upload the logs to Amazon S3. Import the logs to an Amazon RDS DB instance.
B. Create an AWS Lambda function to call the HTTP endpoint to fetch audit logs. Configure an Amazon EventBridge scheduled rule to invoke the Lambda function. Configure the Lambda function to push the logs to AWS CloudTrail Lake.
C. Use AWS DataSync to transfer audit logs to an Amazon S3 bucket. Load the logs into an Amazon S3 bucket. Use Amazon Athena to query the bucket.
D. Install the Amazon CloudWatch agent on the on-premises servers. Give the agent the ability to push audit logs to CloudWatch. Use CloudWatch Insights to query the logs.
Show Answer
Correct Answer: D
Explanation:
The requirement is to regularly ingest large volumes of on-premises audit logs and query them with minimal operational overhead. The Amazon CloudWatch agent is designed to collect log files from on-premises servers and send them to CloudWatch Logs, where CloudWatch Logs Insights provides managed querying. Option B misuses CloudTrail Lake, which is intended for CloudTrail and supported audit event sources rather than as a general log ingestion target. Option C is not appropriate because AWS DataSync transfers files from storage systems, not by polling an HTTP endpoint. Option A introduces unnecessary database management and is not operationally efficient.

Question 85

A company has an ecommerce application. The application's API sends order data to an Amazon Simple Queue Service (Amazon SOS) queue. A developer needs to modify the application to enrich the order data before the application sends the order data to a fulfillment system. Which solution will meet this requirement with the LEAST development effort?

A. Create an AWS Lambda function to poll the SOS queue. enrich the message data, and send the enriched data to the fulfilment system, Create an Amazon Simple Notification Service (Amazon SNS) topic. Subscribe the Lambda function to the SNS topic.
B. Create an AWS Step Functions state machine. Configure an Amazon EventBridge rule to run the state machine when an order is published to the SQS queue. Map the orders to an AWS Lambda function. Program the Lambda function to perform the data enrichment and to invoke the state machine. Configure the last step of the state machine to send the enriched data to the fulfilment system,
C. Create an Amazon EMR cluster to read messages from the SQS queue. Configure an EMR job to enrich the order data. Create and configure an Amazon S3 bucket as the output location. Adjust the order fulfilment system to retrieve the enriched files from the S3 bucket.
D. Create an Amazon EventBridge pipe that uses event enrichment. Configure the SQS queue as a source for the pipe. Set the fulfillment system as the target of the pipe.
Show Answer
Correct Answer: D
Explanation:
Amazon EventBridge Pipes can directly connect an Amazon SQS queue to a target and supports optional event enrichment (for example, via Lambda or API destinations) and transformations with minimal custom code. This provides the required enrichment before delivery to the fulfillment system with the least development effort. The other options introduce unnecessary components or are not appropriate for this integration pattern.

Question 86

A developer is creating an application that uses an Amazon DynamoDB table. The developer needs to develop code that reads all records that were added to the table during the previous day, creates HTML reports, and pushes the reports into third-party storage. The item size varies from 1 KB to 4 KB, and the index structure is defined with the date. The developer needs to minimize the read capacity that the application requires from the DynamoDB table. Which DynamoDB API operation should the developer use in the code to meet these requirements?

A. Query
B. Scan
C. BatchGetItem
D. GetItem
Show Answer
Correct Answer: A
Explanation:
Query is the most efficient operation when you need to retrieve items that match a specific partition key (and optionally a sort key/range). Because the access pattern is based on the date indexed in DynamoDB, Query can read only the items for the previous day instead of scanning the entire table, minimizing read capacity consumption. Scan reads every item, GetItem retrieves only one item by its full primary key, and BatchGetItem retrieves multiple known keys rather than querying by date.

Question 87

A developer needs to configure an AWS Lambda function to make HTTP POST requests to an internal application. The application is in the same AWS account that hosts the function. The internal application runs on Amazon EC2 instances in a private subnet within a VPC. Which solution will meet these requirements?

A. Configure a VPC endpoint to connect to the private subnet. Attach the endpoint to the Lambda function.
B. Attach the Lambda function to the VPC and to the private subnet.
C. Configure a VPN connection between the Lambda function and the private subnet. Attach the VPN to the Lambda function.
D. Configure the VPC route table to include the Lambda function’s IP address.
Show Answer
Correct Answer: B
Explanation:
To allow a Lambda function to access EC2 instances in private subnets, configure the Lambda function to run inside the same VPC by attaching it to appropriate private subnets and security groups. Lambda creates elastic network interfaces in the selected subnets, enabling private IP connectivity to the internal application. VPC endpoints are for accessing supported AWS services, not arbitrary EC2-hosted applications. A VPN is unnecessary within the same AWS account/VPC, and route tables cannot target a Lambda function's ephemeral IP address.

Question 88

A company runs a new application on AWS Elastic Beanstalk. The company needs to deploy updates to the application. The updates must not cause any downtime for application users. The deployment must forward a specified percentage of incoming client traffic to a new application version during an evaluation period. Which deployment type will meet these requirements?

A. rolling
B. traffic-splitting
C. in-place
D. immutable
Show Answer
Correct Answer: B
Explanation:
Traffic-splitting deployments route a configurable percentage of incoming client requests to the new application version for an evaluation period while the remaining traffic continues to use the existing version. This provides zero-downtime canary-style deployment. Rolling deployments update batches of instances, immutable deployments launch a separate Auto Scaling group but do not perform percentage-based traffic evaluation, and in-place deployments can cause downtime.

Question 89

An application interacts with Amazon Aurora to store and track customer information. The primary database is set up with multiple read replicas for improving the performance of the read queries. However, one of the Aurora replicas is receiving most or all of the traffic, while the other Aurora replica remains idle. How can this issue be resolved?

A. Disable application-level DNS caching.
B. Enable application-level DNS caching.
C. Enable application pooling
D. Disable application pooling
Show Answer
Correct Answer: A
Explanation:
Amazon Aurora reader endpoints distribute connections across read replicas using DNS-based load balancing. If the application caches DNS results, it can keep connecting to the same replica, causing uneven traffic distribution. Disabling application-level DNS caching allows periodic re-resolution of the reader endpoint so connections can be balanced across replicas.

Question 90

A developer manages encryption keys in AWS Key Management Service (AWS KMS). The developer must ensure that all encryption keys can be deleted immediately when the keys are no longer required. The developer wants a solution that is highly available and does not require manual management for compute infrastructure. Which solution will meet these requirements?

A. Use AWS KMS managed keys. When the keys are no longer required, schedule the keys for immediate deletion.
B. Use customer managed keys with imported key material. When the keys are no longer required, delete the imported key material.
C. Use customer managed keys. When the keys are no longer required, delete the key material.
D. Use customer managed keys and an AWS CloudHSM key store. When the keys are no longer required, schedule the keys for immediate deletion.
Show Answer
Correct Answer: B
Explanation:
AWS KMS customer managed keys normally require a mandatory waiting period (7–30 days) before deletion, so they cannot be deleted immediately. If you use a customer managed KMS key with imported key material, you can delete the imported key material immediately, rendering the key unusable without waiting. This is a fully managed KMS solution that does not require managing compute infrastructure and remains highly available.

$19

Get all 553 questions with detailed answers and explanations

  • Instant download HTML + PDF delivered the moment payment clears.
  • Secure Stripe checkout we never see or store your card details.
  • 7-day refund if files are defective see our refund policy.