PracticeCF

DVA-C02 Question Bank · Latest 50 Questions Free Preview (Page 4/5)

Questions 31–40 of the latest 50 DVA-C02 questions (5 pages total), with answers and explanations, no login required. Practice all 1394 questions online.

Question 31 · No. 1375 · Single choice

A company is building an application to accept data from customers. The data must be encrypted at rest and in transit. The application uses an Amazon API Gateway API that resolves to AWS Lambda functions. The Lambda functions store the data in an Amazon Aurora MySQL DB cluster. The application worked properly during testing. A developer configured an Amazon CloudFront distribution with field-level encryption that uses an AWS Key Management Service (AWS KMS) key. After the configuration of the distribution, the application behaved unexpectedly. All the data in the database changed from plaintext to ciphertext. The developer must ensure that the data is not stored in the database as the ciphertext from the CloudFront field-level encryption. Which solution will meet this requirement?

Answer: B

Explanation: The issue arises because the data is being encrypted at the CloudFront level via field-level encryption, and this encrypted data is then being stored directly in the database. To resolve this, a Lambda function can be used to decrypt the data fields using the KMS key before saving them to the database. This ensures that the data remains in plaintext within the database as intended.
Question 32 · No. 1376 · Single choice

A developer needs to build a workflow to handle messages that are sent to an Amazon Simple Queue Service (Amazon SQS) queue. When a message reaches the queue, the workflow must implement a delay before invoking an AWS Lambda function to process the message. Which solution will meet this requirement in the MOST operationally efficient way?

Answer: C

Explanation: The most operationally efficient solution is to use the built-in SQS feature 'DelaySeconds' which delays the delivery of messages in the queue. This approach requires minimal code changes and leverages AWS's managed services effectively. After the delay, an event source mapping triggers the Lambda function automatically, ensuring seamless integration.
Question 33 · No. 1377 · Single choice

A development team has an Amazon API Gateway REST API that is backed by an AWS Lambda function. Users have reported performance issues for the Lambda function. The development team identified the source of the issues as a cold start of the Lambda function. The development team needs to reduce the time needed for the Lambda function to initialize. Which solution will meet this requirement?

Answer: D

Explanation: The issue described is related to cold starts in the Lambda function. Cold starts occur when a Lambda function is invoked after being idle for some time, causing latency due to the initialization of the execution environment. To reduce cold start times, the best solution is to configure provisioned concurrency for the Lambda function. Provisioned concurrency keeps the function initialized and ready to handle requests, eliminating the cold start problem. Reserved concurrency (Option A) manages the number of concurrent executions but does not address cold starts. Increasing timeout (Option B) or memory allocation (Option C) does not directly impact cold start performance.
Question 34 · No. 1378 · Single choice

A developer is building an application that includes an AWS Lambda function that is written in .NET Core. The Lambda function’s code needs to interact with Amazon DynamoDB tables and Amazon S3 buckets. The developer must minimize the Lambda function’s deployment time and invocation duration. Which solution will meet these requirements?

Answer: C

Explanation: Including only the necessary AWS SDK for .NET modules (for DynamoDB and S3) in the Lambda function's deployment package reduces the package size. This minimizes both the deployment time and the invocation duration, as smaller packages are uploaded faster and consume less memory during execution. Including the entire SDK (option B) or downloading it at runtime (option D) would increase the deployment size and/or invocation latency, which is not optimal. Increasing memory (option A) might improve execution speed but does not address the deployment size issue.
Question 35 · No. 1379 · Single choice

A developer must cache dependent artifacts from Maven Central, a public package repository, as part of an application’s build pipeline. The build pipeline has an AWS CodeArtifact repository where artifacts of the build are published. The developer needs a solution that requires minimum changes to the build pipeline. Which solution meets these requirements?

Answer: A

Explanation: The question requires a solution that minimizes changes to the existing build pipeline. Option A involves modifying the existing CodeArtifact repository to associate it with an upstream repository (Maven Central). This approach fulfills the requirement without introducing significant changes to the pipeline, as it leverages the current repository setup. Options B and C involve creating new repositories or domains, which introduces more changes than necessary. Option D is incorrect because modifying the resource policy alone does not enable fetching artifacts from Maven Central; an upstream repository association is required.
Question 36 · No. 1380 · Single choice

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?

Answer: C

Explanation: To interact with AWS services like deploying a CloudFormation stack, the developer needs to use the AWS CLI configured with valid IAM credentials. IAM user access keys (access key ID and secret access key) are required for programmatic access to AWS services. Using an SSH key or X.509 certificate is not relevant for this scenario, as those methods are used for different purposes. The correct answer is C.
Question 37 · No. 1381 · Multiple choice

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.)

Answer: A, D

Explanation: The question asks for two solutions that will update the Elastic Beanstalk environment with a new application version. Option A is correct because it describes packaging the code into a .zip file and deploying it directly through the AWS Management Console, which is a valid method. Option D is also correct because it involves creating a new application version from a .zip file using the AWS CLI and then updating the environment, which is another valid approach. Options B, C, and E are incorrect because they either involve unnecessary steps (like rebuilding the environment) or unsupported file types (.tar files).
Question 38 · No. 1382 · Single choice

A company runs continuous integration/continuous delivery (CI/CD) pipelines for its application on AWS CodePipeline. A developer must write unit tests and run them as part of the pipelines before staging the artifacts for testing. How should the developer incorporate unit tests as part of CI/CD pipelines?

Answer: B

Explanation: The best way to incorporate unit tests as part of CI/CD pipelines is to update the AWS CodeBuild build specification to include a phase for running unit tests. This approach ensures that the tests are executed automatically during the build phase, before the artifacts are staged for further testing. Using CodeBuild's native capabilities keeps the pipeline streamlined and leverages AWS services effectively without requiring additional resources or complex configurations.
Question 39 · No. 1383 · Single choice

A team has an Amazon API Gateway REST API that consists of a single resource and a GET method that is backed by an AWS Lambda integration. A developer makes a change to the Lambda function and deploys the function as a new version. The developer needs to set up a process to test the new version of the function before using the new version in production. The tests must not affect the production REST API. Which solution will meet these requirements with the LEAST operational overhead?

Answer: B

Explanation: The requirement is to test the new version of the Lambda function without affecting the production REST API and with minimal operational overhead. Option B suggests creating a new stage for the REST API and using a stage variable to point to the updated Lambda function. This allows testing of the new Lambda version in isolation (on the new stage) without impacting the existing production stage. It avoids the need to create additional resources or a completely new REST API, reducing complexity and overhead.
Question 40 · No. 1384 · Single choice

A developer created reusable code that several AWS Lambda functions need to use. The developer bundled the code into a zip archive. The developer needs to deploy the code to AWS and update the Lambda functions to use the code. Which solution will meet this requirement in the MOST operationally efficient way?

Answer: C

Explanation: The most operationally efficient solution is to create a Lambda layer that contains the zip archive and attach it to the Lambda functions. Lambda layers are specifically designed for sharing reusable code across multiple Lambda functions without duplicating the code in each function’s deployment package. This approach simplifies updates to the shared code since changes made to the layer automatically propagate to all functions using it, reducing operational overhead.
Prev 12345 Next