πŸ”

DVA-C02 β€” questions

Page 24 of 28 Β· 557 total questions.

Topic 1 Β· Question 461

A developer is using AWS CloudFormation to deploy an AWS Lambda function. The developer needs to set the Lambda function's timeout value based on the environment parameter of the template. The template contains mappings of EnvironmentData for each environment's timeout value. The environment parameter and EnvironmentData mappings are as follows: Environment parameter: EnvironmentData mappings: Which statement will meet these requirements?

Exhibit 1 for question 461Exhibit 2 for question 461
  • ATimeout: !GetAtt [EnvironmentData, !Ref Environment, Timeout]
  • BTimeout: !FindInMap [EnvironmentData, !Ref Environment, Timeout] (correct answer)
  • CTimeout: !Select [EnvironmentData, !Ref Environment, Timeout]
  • DTimeout: !ForEach[EnvironmentData, !Ref Environment, Timeout]
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Timeout: !FindInMap [EnvironmentData, !Ref Environment, Timeout].

Topic 1 Β· Question 462

A company’s AWS accounts are in an organization in AWS Organizations. An application in Account A uses environment variables that are stored as parameters in AWS Systems Manager Parameter Store. A developer is creating a new application in Account B that needs to use the same environment variables. The application in Account B needs access to the parameters in Account A without duplicating the parameters into Account B. Which solution will meet these requirements with the LEAST operational overhead?

  • AConfigure the application in Account B to use credentials for an IAM user in AccountA that has access to the parameters.
  • BCreate an assumable IAM role in Account A. Grant the role the permission to access the parameters.
  • CConfigure cross-account resource sharing for the parameters by using AWS Resource Access Manager (AWS RAM). (correct answer)
  • DWrite a script that stores the parameter values in a private Amazon S3 bucket that both accounts can access.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Configure cross-account resource sharing for the parameters by using AWS Resource Access Manager (AWS RAM).

Explanation

AWS Config tracks resource configuration changes and evaluates compliance.

Topic 1 Β· Question 463

In a move toward using microservices, a company’s management team has asked all development teams to build their services so that API requests depend only on that service’s data store. One team is building a Payments service which has its own database; the service needs data that originates in the Accounts database. Both are using Amazon DynamoDB. What approach will result in the simplest, decoupled, and reliable method to get near-real time updates from the Accounts database?

  • AUse AWS Glue to perform frequent ETL updates from the Accounts database to the Payments database.
  • BUse Amazon ElastiCache in Payments, with the cache updated by triggers in the Accounts database.
  • CUse Amazon Data Firehose to deliver all changes from the Accounts database to the Payments database.
  • DUse Amazon DynamoDB Streams to deliver all changes from the Accounts database to the Payments database. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Use Amazon DynamoDB Streams to deliver all changes from the Accounts database to the Payments database.

Explanation

Amazon DynamoDB is a fully managed, serverless NoSQL database with single-digit millisecond latency and automatic scaling. This option meets the real-time / low-latency performance requirement.

Topic 1 Β· Question 464 Β· Select all that apply

A developer compiles an AWS Lambda function and packages the result as a .zip file. The developer uses the Functions page on the Lambda console to attempt to upload the local packaged .zip file. When pushing the package ta Lambda, the console returns the following error: Which solutions can the developer use to publish the code? (Choose two.)

Exhibit 1 for question 464
  • AUpload the package to Amazon 3. Use the Functions page on the Lambda console to upload the package from the S3 location. (correct answer)
  • BCreate an AWS Support ticket to increase the maximum package size.
  • CUse the update-function-code AWS CLI command. Pass the --publish parameter.
  • DRepackage the Lambda function as a Docker container image. Upload the image to Amazon Elastic Container Registry (Amazon ECR). Create a new Lambda function by using the Lambda console. Reference the image that is deployed to Amazon ECR. (correct answer)
  • ESign the .zip file digitally. Create a new Lambda function by using the Lambda console. Update the configuration of the new Lambda function to include the Amazon Resource Name (ARN) of the code signing configuration.
Reveal answer & explanation
Correct answer: A, D

The correct answer is A, D. Option A: Upload the package to Amazon 3. Use the Functions page on the Lambda console to upload the package from the S3 location. Option D: Repackage the Lambda function as a Docker container image. Upload the image to Amazon Elastic Container Registry (Amazon ECR). Create a new Lambda function by using the Lambda console. Reference the image that is depl...

Explanation

AWS Lambda runs code without provisioning servers and scales automatically, which minimizes operational overhead. Amazon S3 provides durable, scalable object storage that is fully managed.

Topic 1 Β· Question 465

A company runs an application on Amazon EC2 instances in an Auto Scaling group. The application experiences variable loads throughout each day. The company needs to collect detailed metrics from the EC2 instances to right-size the instances. The company also wants to monitor custom application metrics to ensure the application is performing efficiently. Which solution will meet these requirements?

  • AInstall the AWS X-Ray agent on the instances. Configure the agent to collect the EC2 instance metrics and the custom application metrics.
  • BInstall the Amazon CloudWatch agent on the instances. Configure the agent to collect the EC2 instance metrics and the custom application metrics. (correct answer)
  • CInstall the AWS SDK in the application’s cade. Update the application to use the AWS SDK to collect and publish the EC2 instance metrics and the custom application metrics.
  • DConfigure AWS CloudTrail to capture and analyze the EC2 instance metrics and the custom application metrics.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Install the Amazon CloudWatch agent on the instances. Configure the agent to collect the EC2 instance metrics and the custom application metrics.

Explanation

Amazon EC2 provides resizable virtual servers when you need full control of the operating system. Amazon CloudWatch collects metrics, logs and alarms to monitor and react to operational health. AWS Config tracks resource configuration changes and evaluates compliance.

Topic 1 Β· Question 466

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?

  • AQuery (correct answer)
  • BScan
  • CBatchGetItem
  • DGetItem
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Query.

Topic 1 Β· Question 467

A company is launching a feature that uses an HTTP API built with Amazon API Gateway and AWS Lambda. An API Gateway endpoint performs several independent tasks that run in a Lambda function. The independent tasks can take up to 10 minutes in total to finish running. Users report that the endpoint sometimes returns an HTTP 604 status code. The Lambda function invocations are successful. Which solution will stop the endpoint from returning the HTTP 504 status cade?

Exhibit 1 for question 467
  • AIncrease the Lambda function’s timeout value.
  • BIncrease the reserved concurrency of the Lambda function.
  • CIncrease the memory that is available to the Lambda function.
  • DRefactor the Lambda function to start an AWS Step Functions state machine. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Refactor the Lambda function to start an AWS Step Functions state machine.

Explanation

AWS Lambda runs code without provisioning servers and scales automatically, which minimizes operational overhead. AWS Step Functions coordinates multi-step workflows as a managed state machine.

Topic 1 Β· Question 468

A company has an application that uses an Amazon Cognito user pool for authentication. A developer needs to add a new REST API that will use the user pool to authenticate requests. Which solution will meet this requirement with the LEAST development effort?

  • ACreate a new API key and a new usage plan. Associate the API key and the REST API with the usage plan.
  • BCreate a Cognito authorizer for the correct user pool. Reference the header that contains the Cognito token. (correct answer)
  • CCreate an AWS Lambda token authorizer. Reference the authorization token in the event payload. Authenticate requests based on the token value.
  • DCreate an AWS Lambda request authorizer. Reference the authorization header in the event payload. Authenticate requests by using the header value in a request to the Cognito API.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Create a Cognito authorizer for the correct user pool. Reference the header that contains the Cognito token.

Explanation

Amazon Cognito manages user sign-up, sign-in and federated identity for applications. This option needs the least custom development effort.

Topic 1 Β· Question 469

A developer is testing an AWS Lambda function that has an event source of an Amazon Simple Queue Service (Amazon SQS) queue. The developer notices that some of the messages the Lambda function processes re-appear in the queue while the messages are being processed. The developer must correct this behavior. Which solution will meet this requirement?

  • AIncrease the timeout of the Lambda function.
  • BIncrease the visibility timeout of the SQS queue. (correct answer)
  • CIncrease the memory allocation of the Lambda function.
  • DIncrease the batch size in the event source mapping.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Increase the visibility timeout of the SQS queue.

Explanation

Amazon SQS is a fully managed message queue that decouples components and absorbs traffic spikes.

Topic 1 Β· Question 470

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?

  • AUpload the zip archive to Amazon S3. Configure an import path on the Lambda functions to point to the zip archive.
  • BCreate a new Lambda function that contains and runs the shared code. Update the existing Lambda functions to invoke the new Lambda function synchronously.
  • CCreate a Lambda layer that contains the zip archive. Attach the Lambda layer to the Lambda functions. (correct answer)
  • DCreate a Lambda container image that includes the shared code. Use the container image as a Lambda base image for all the functions.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Create a Lambda layer that contains the zip archive. Attach the Lambda layer to the Lambda functions.

Explanation

AWS Lambda runs code without provisioning servers and scales automatically, which minimizes operational overhead.

Topic 1 Β· Question 471

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?

  • ACreate a new resource in the REST API. Add a GET method to the new resource, and add a Lambda integration to the updated version of the Lambda function. Deploy the new version.
  • BCreate a new stage for the REST API. Create a stage variable. Assign the stage variable to the Lambda function. Set the API Gateway integrated Lambda function name to the stage variable. Deploy the new version. (correct answer)
  • CCreate a new REST API. Add a resource that has a single GET method that is integrated with the updated version of the Lambda function.
  • DUpdate the Lambda integration of the existing GET method to point to the updated version of the Lambda function. Deploy the new version.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Create a new stage for the REST API. Create a stage variable. Assign the stage variable to the Lambda function. Set the API Gateway integrated Lambda function name to the stage variable. Deploy the new version.

Explanation

AWS Lambda runs code without provisioning servers and scales automatically, which minimizes operational overhead. Amazon API Gateway is a fully managed front door for creating and securing APIs at scale.

Topic 1 Β· Question 472

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?

  • AUse AWS KMS managed keys. When the keys are no longer required, schedule the keys for immediate deletion.
  • BUse customer managed keys with imported key material. When the keys are no longer required, delete the imported key material. (correct answer)
  • CUse customer managed keys. When the keys are no longer required, delete the key material.
  • DUse customer managed keys and an AWS CloudHSM key store. When the keys are no longer required, schedule the keys for immediate deletion.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Use customer managed keys with imported key material. When the keys are no longer required, delete the imported key material. By spanning multiple Availability Zones / adding redundancy, this option provides the high availability and resilience required.

Topic 1 Β· Question 473

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?

  • ACreate 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.
  • BCreate 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,
  • CCreate 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.
  • DCreate 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. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option 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.

Explanation

Amazon SQS is a fully managed message queue that decouples components and absorbs traffic spikes. Amazon EventBridge routes events between services with rules, enabling event-driven, decoupled architectures. AWS Config tracks resource configuration changes and evaluates compliance. This option needs the least custom development effort.

Topic 1 Β· Question 474

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?

  • ADisable application-level DNS caching. (correct answer)
  • BEnable application-level DNS caching.
  • CEnable application pooling
  • DDisable application pooling
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Disable application-level DNS caching.

Topic 1 Β· Question 475

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?

  • ACreate a separate CodePipeline pipeline to run unit tests.
  • BUpdate the AWS CodeBuild build specification to include a phase for running unit tests. (correct answer)
  • CInstall the AWS CodeDeploy agent on an Amazon EC2 instance to run unit tests.
  • DCreate a testing branch in a git repository for the pipelines to run unit tests.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Update the AWS CodeBuild build specification to include a phase for running unit tests.

Explanation

AWS CodeBuild compiles, tests and packages code in a managed build service.

Topic 1 Β· Question 476 Β· Select all that apply

A developer is troubleshooting a three-tier application, which is deployed on Amazon EC2 instances. There is a connectivity problem between the application servers and the database servers. Which AWS services or tools should be used to identity the faulty component? (Choose two.)

  • AAWS CloudTrail
  • BAWS Trusted Advisor
  • CAmazon VPC Flow Logs (correct answer)
  • DNetwork access control lists (correct answer)
  • EAWS Config rules
Reveal answer & explanation
Correct answer: C, D

The correct answer is C, D. Option C: Amazon VPC Flow Logs Option D: Network access control lists.

Topic 1 Β· Question 477

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?

  • Arolling
  • Btraffic-splitting (correct answer)
  • Cin-place
  • Dimmutable
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: traffic-splitting.

Topic 1 Β· Question 478 Β· Select all that apply

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

  • APackage the application code into a zip file. Use the AWS Management Console to upload the .zip file and deploy the packaged application. (correct answer)
  • BPackage 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.
  • CPackage the application code into a .tar file. Use the AWS Management Console to upload the .tar file and deploy the packaged application.
  • DPackage 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. (correct answer)
  • EPackage 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.
Reveal answer & explanation
Correct answer: A, D

The correct answer is A, D. Option A: Package the application code into a zip file. Use the AWS Management Console to upload the.zip file and deploy the packaged application. Option 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.

Topic 1 Β· Question 479

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?

  • AInstall the AWS CLI. Configure the AWS CLI by using an IAM user name and password.
  • BInstall the AWS CLI. Configure the AWS CLI by using an SSH key.
  • CInstall the AWS CLI, Configure the AWS CLI by using an IAM user access key and secret key. (correct answer)
  • DInstall an AWS software development kit (SDK). Configure the SDK by using an X.509 certificate.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Install the AWS CLI, Configure the AWS CLI by using an IAM user access key and secret key.

Explanation

AWS IAM controls authenticated and authorized access to AWS resources with fine-grained policies. AWS Config tracks resource configuration changes and evaluates compliance.

Topic 1 Β· Question 480

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?

  • Arolling
  • Btraffic-splitting (correct answer)
  • Cin-place
  • Dimmutable
Reveal answer & explanation
Correct answer: B

The correct answer is B.

Showing questions 461–480 of 557 Β· Page 24 of 28