πŸ”

DVA-C02 β€” questions

Page 19 of 28 Β· 557 total questions.

Topic 1 Β· Question 361

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?

  • AAdd a local secondary index (LSI) during table creation. Query the LSI by using eventually consistent reads.
  • BAdd a local secondary index (LSI) during table creation. Query the LSI by using strongly consistent reads. (correct answer)
  • CAdd a global secondary index (GSI) during table creation. Query the GSI by using eventually consistent reads.
  • DAdd a global secondary index (GSI) during table creation. Query the GSI by using strongly consistent reads.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Add a local secondary index (LSI) during table creation. Query the LSI by using strongly consistent reads.

Topic 1 Β· Question 362

A developer manages an application that writes customer orders to an Amazon DynamoDB table. The orders use customer_id as the partition key, order_id as the sort key, and order_date as an attribute. A new access pattern requires accessing data by order_date and order_id. The developer needs to implement a new AWS Lambda function to support the new access pattern. How should the developer support the new access pattern in the MOST operationally efficient way?

  • AAdd a new local secondary index (LSI) to the DynamoDB table that specifies order_date as the partition key and order_id as the sort key. Write the new Lambda function to query the new LSI index.
  • BWrite the new Lambda function to scan the DynamoDB table. In the Lambda function, write a method to retrieve and combine results by order_date and order_id.
  • CAdd a new global secondary index (GSI) to the DynamoDB table that specifies order_date as the partition key and order_id as the sort key. Write the new Lambda function to query the new GSI index. (correct answer)
  • DEnable DynamoDB Streams on the table. Choose the new and old images information to write to the DynamoDB stream. Write the new Lambda function to query the DynamoDB stream
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Add a new global secondary index (GSI) to the DynamoDB table that specifies order_date as the partition key and order_id as the sort key. Write the new Lambda function to query the new GSI index.

Explanation

AWS Lambda runs code without provisioning servers and scales automatically, which minimizes operational overhead. Amazon DynamoDB is a fully managed, serverless NoSQL database with single-digit millisecond latency and automatic scaling.

Topic 1 Β· Question 363

A developer is creating a web application for a school that stores data in Amazon DynamoDB. The ExamScores table has the following attributes: student_id, subject_name, and top_score. Each item in the ExamScores table is identified with student_id as the partition key and subject_name as the sort key. The web application needs to display the student _id for the top scores for each school subject. The developer needs to increase the speed of the queries to retrieve the student_id for the top scorer for each school subject. Which solution will meet these requirements?

  • ACreate a local secondary index (LSI) with subject_name as the partition key and top_score as the sort key.
  • BCreate a local secondary index (LSI) with top_score as the partition key and student_id as the sort key.
  • CCreate a global secondary index (GSI) with subject_name as the partition key and top_score as the sort key. (correct answer)
  • DCreate a global secondary index (GSI) with subject_name as the partition key and student_id as the sort key.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Create a global secondary index (GSI) with subject_name as the partition key and top_score as the sort key.

Topic 1 Β· Question 364

A developer wrote an application that uses an AWS Lambda function to asynchronously generate short videos based on requests from customers. This video generation can take up to 10 minutes. After the video is generated, a URL to download the video is pushed to the customer's web browser. The customer should be able to access these videos for at least 3 hours after generation. Which solution will meet these requirements?

  • AStore the video in the /tmp folder within the Lambda execution environment. Push a Lambda function URL to the customer.
  • BStore the video in an Amazon Elastic File System (Amazon EFS) file system attached to the function. Generate a pre-signed URL for the video object and push the URL to the customer.
  • CStore the video in Amazon S3. Generate a pre-signed URL for the video object and push the URL to the customer. (correct answer)
  • DStore the video in an Amazon CloudFront distribution. Generate a pre-signed URL for the video object and push the URL to the customer.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Store the video in Amazon S3. Generate a pre-signed URL for the video object and push the URL to the customer.

Explanation

Amazon S3 provides durable, scalable object storage that is fully managed. This option decouples the components so they scale independently and absorb load spikes.

Topic 1 Β· Question 365

A developer is creating an AWS Lambda function that is invoked by messages to an Amazon Simple Notification Service (Amazon SNS) topic. The messages represent customer data updates from a customer relationship management (CRM) system The developer wants the Lambda function to process only the messages that pertain to email address changes. Additional subscribers to the SNS topic will process any other messages. Which solution will meet these requirements in the LEAST development effort?

  • AUse Lambda event filtering to allow only messages that are related to email address changes to invoke the Lambda function.
  • BUse an SNS filter policy on the Lambda function subscription to allow only messages that are related to email address changes to invoke the Lambda function. (correct answer)
  • CSubscribe an Amazon Simple Queue Service (Amazon SQS) queue to the SNS topic. Configure the SQS queue with a filter policy to allow only messages that are related to email address changes. Connect the SQS queue to the Lambda function.
  • DConfigure the Lambda code to check the received message. If the message is not related to an email address change, configure the Lambda function to publish the message back to the SNS topic for the other subscribers to process.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Use an SNS filter policy on the Lambda function subscription to allow only messages that are related to email address changes to invoke the Lambda function.

Explanation

AWS Lambda runs code without provisioning servers and scales automatically, which minimizes operational overhead. Amazon SNS is a managed pub/sub service for fan-out notifications to many subscribers. This option needs the least custom development effort.

Topic 1 Β· Question 366

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?

  • AUse sticky sessions with an Elastic Load Balancer target group.
  • BUse Amazon SQS to save session data.
  • CUse Amazon DynamoDB to perform scalable session handling. (correct answer)
  • DUse Elastic Load Balancer connection draining to stop sending requests to failing instances.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Use Amazon DynamoDB to perform scalable session handling.

Explanation

Amazon DynamoDB is a fully managed, serverless NoSQL database with single-digit millisecond latency and automatic scaling. By spanning multiple Availability Zones / adding redundancy, this option provides the high availability and resilience required.

Topic 1 Β· Question 367

A developer is creating AWS CloudFormation templates to manage an application's deployment in Amazon Elastic Container Service (Amazon ECS) through AWS CodeDeploy. The developer wants to automatically deploy new versions of the application to a percentage of users before the new version becomes available for all users. How should the developer manage the deployment of the new version?

  • AModify the CloudFormation template to include a Transform section and the AWS::CodeDeploy::BlueGreen hook. (correct answer)
  • BDeploy the new version in a new CloudFormation stack. After testing is complete, update the application's DNS records for the new stack.
  • CRun CloudFormation stack updates on the application stack to deploy new application versions when they are available.
  • DCreate a nested stack for the new version. Include a Transform section and the AWS::CodeDeploy::BlueGreen hook.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Modify the CloudFormation template to include a Transform section and the AWS::CodeDeploy::BlueGreen hook.

Explanation

AWS CloudFormation provisions infrastructure as code repeatably. AWS CodeDeploy automates application deployments to compute services.

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

A developer has written a distributed application that uses microservices. The microservices are running on Amazon EC2 instances. Because of message volume, the developer is unable to match log output from each microservice to a specific transaction. The developer needs to analyze the message flow to debug the application. Which combination of steps should the developer take to meet this requirement? (Choose two.)

  • ADownload the AWS X-Ray daemon. Install the daemon on an EC2 instance. Ensure that the EC2 instance allows UDP traffic on port 2000. (correct answer)
  • BConfigure an interface VPC endpoint to allow traffic to reach the global AWS X-Ray daemon on TCP port 2000.
  • CEnable AWS X-Ray. Configure Amazon CloudWatch to push logs to X-Ray.
  • DAdd the AWS X-Ray software development kit (SDK) to the microservices. Use X-Ray to trace requests that each microservice makes. (correct answer)
  • ESet up Amazon CloudWatch metric streams to collect streaming data from the microservices.
Reveal answer & explanation
Correct answer: A, D

The correct answer is A, D. Option A: Download the AWS X-Ray daemon. Install the daemon on an EC2 instance. Ensure that the EC2 instance allows UDP traffic on port 2000. Option D: Add the AWS X-Ray software development kit (SDK) to the microservices. Use X-Ray to trace requests that each microservice makes.

Explanation

Amazon EC2 provides resizable virtual servers when you need full control of the operating system. AWS X-Ray traces requests to analyze and debug distributed applications.

Topic 1 Β· Question 369

A company is working on a new serverless application. A developer needs to find an automated way to deploy AWS Lambda functions and the dependent infrastructure with minimum coding effort. The application also needs to be reliable. Which method will meet these requirements with the LEAST operational overhead?

  • ABuild the application by using shell scripts to create .zip files for each Lambda function. Manually upload the .zip files to the AWS Management Console.
  • BBuild the application by using the AWS Serverless Application Model (AWS SAM). Use a continuous integration and continuous delivery (CI/CD) pipeline and the SAM CLI to deploy the Lambda functions. (correct answer)
  • CBuild the application by using shell scripts to create .zip files for each Lambda function. Upload the .zip files. Deploy the .zip files as Lambda functions by using the AWS CLI in a continuous integration and continuous delivery (CI/CD) pipeline.
  • DBuild a container for each Lambda function. Store the container images in AWS CodeArtifact. Deploy the containers as Lambda functions by using the AWS CLI in a continuous integration and continuous delivery (CI/CD) pipeline.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Build the application by using the AWS Serverless Application Model (AWS SAM). Use a continuous integration and continuous delivery (CI/CD) pipeline and the SAM CLI to deploy the Lambda functions.

Explanation

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

Topic 1 Β· Question 370

A developer needs to modify an application architecture to meet new functional requirements. Application data is stored in Amazon DynamoDB and processed for analysis in a nightly batch. The system analysts do not want to wait until the next day to view the processed data and have asked to have it available in near-real time. Which application architecture pattern would enable the data to be processed as it is received?

  • AEvent driven (correct answer)
  • BClient-server driven
  • CFan-out driven
  • DSchedule driven
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Event driven This option meets the real-time / low-latency performance requirement.

Topic 1 Β· Question 371

A company hosts its application in the us-west-1 Region. The company wants to add redundancy in the us-east-1 Region. The application secrets are stored in AWS Secrets Manager in us-west-1. A developer needs to replicate the secrets to us-east-1. Which solution will meet this requirement?

  • AConfigure secret replication for each secret. Add us-east-1 as a replication Region. Choose an AWS Key Management Service (AWS KMS) key in us-east-1 to encrypt the replicated secrets. (correct answer)
  • BCreate a new secret in us-east-1 for each secret. Configure secret replication in us-east-1. Set the source to be the corresponding secret in us-west-1. Choose an AWS Key Management Service (AWS KMS) key in us-west-1 to encrypt the replicated secrets.
  • CCreate a replication rule for each secret. Set us-east-1 as the destination Region. Configure the rule to run during secret rotation. Choose an AWS Key Management Service (AWS KMS) key in us-east-1 to encrypt the replicated secrets.
  • DCreate a Secrets Manager lifecycle rule to replicate each secret to a new Amazon S3 bucket in us-west-1. Configure an S3 replication rule to replicate the secrets to us-east-1.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Configure secret replication for each secret. Add us-east-1 as a replication Region. Choose an AWS Key Management Service (AWS KMS) key in us-east-1 to encrypt the replicated secrets.

Explanation

AWS KMS manages encryption keys and integrates with most AWS services for encryption at rest. AWS Config tracks resource configuration changes and evaluates compliance.

Topic 1 Β· Question 372

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?

  • AImplement a TTL strategy for every item that is saved in the cache.
  • BImplement a write-through strategy for every item that is created and updated. (correct answer)
  • CImplement a lazy loading strategy for every item that is loaded.
  • DImplement a read-through strategy for every item that is loaded.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Implement a write-through strategy for every item that is created and updated.

Topic 1 Β· Question 373

A company has a serverless application that uses Amazon API Gateway backed by AWS Lambda proxy integration. The company is developing several backend APIs. The company needs a landing page to provide an overview of navigation to the APIs. A developer creates a new/LandingPage resource and a new GET method that uses mock integration. What should the developer do next to meet these requirements?

  • AConfigure the integration request mapping template with Content-Type of text/html and statusCode of 200. Configure the integration response mapping template with Content-Type of application/json. In the integration response mapping template, include the LandingPage HTML code that references the APIs.
  • BConfigure the integration request mapping template with Content-Type of application/json. In the integration request mapping template, include the LandingPage HMTL code that references the APIs. Configure the integration response mapping template with Content-Type of text/html and statusCode of 200.
  • CConfigure the integration request mapping template with Content-Type of application/json and statusCode of 200. Configure the integration response mapping template with Content-Type of text/html. In the integration response mapping template, include the LandingPage HTML code that references the APIs. (correct answer)
  • DConfigure the integration request mapping template with Content-Type of text/html. In the integration request mapping template, include the LandingPage HTML code that references the APIs. Configure the integration response mapping template with Content-Type of application/json and statusCode of 200.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Configure the integration request mapping template with Content-Type of application/json and statusCode of 200. Configure the integration response mapping template with Content-Type of text/html. In the integration re...

Explanation

AWS Config tracks resource configuration changes and evaluates compliance.

Topic 1 Β· Question 374

A developer creates an AWS Lambda function that is written in Java. During testing, the Lambda function does not work how the developer expected. The developer wants to use tracing capabilities to troubleshoot the problem. Which AWS service should the developer use to accomplish this goal?

  • AAWS Trusted Advisor
  • BAmazon CloudWatch
  • CAWS X-Ray (correct answer)
  • DAWS CloudTrail
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: AWS X-Ray

Explanation

AWS X-Ray traces requests to analyze and debug distributed applications.

Topic 1 Β· Question 375

A company is developing an application that will be accessed through the Amazon API Gateway REST API. Registered users should be the only ones who can access certain resources of this API. The token being used should expire automatically and needs to be refreshed periodically. How can a developer meet these requirements?

  • ACreate an Amazon Cognito identity pool, configure the Amazon Cognito Authorizer in API Gateway, and use the temporary credentials generated by the identity pool.
  • BCreate and maintain a database record for each user with a corresponding token and use an AWS Lambda authorizer in API Gateway.
  • CCreate an Amazon Cognito user pool, configure the Cognito Authorizer in API Gateway, and use the identity or access token. (correct answer)
  • DCreate an IAM user for each API user, attach an invoke permissions policy to the API, and use an IAM authorizer in API Gateway.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Create an Amazon Cognito user pool, configure the Cognito Authorizer in API Gateway, and use the identity or access token.

Explanation

Amazon API Gateway is a fully managed front door for creating and securing APIs at scale. Amazon Cognito manages user sign-up, sign-in and federated identity for applications. AWS Config tracks resource configuration changes and evaluates compliance.

Topic 1 Β· Question 376

A company used AWS to develop an application for customers. The application includes an Amazon API Gateway API that invokes AWS Lambda functions. The Lambda functions process data and store the data in Amazon DynamoDB tables. The company must monitor the entire application to identify potential bottlenecks in the architecture that can negatively affect customers. Which solution will meet this requirement with the LEAST development effort?

  • AInstrument the application with AWS X-Ray. Inspect the service map to identify errors and issues. (correct answer)
  • BConfigure Lambda exceptions and additional logging to Amazon CloudWatch. Use CloudWatch Logs Insights to query the logs.
  • CConfigure API Gateway to log responses to Amazon CloudWatch. Create a metric filter for the TooManyRequestsException error message.
  • DUse Amazon CloudWatch metrics for the DynamoDB tables to identify all the ProvisionedThroughputExceededException error messages.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Instrument the application with AWS X-Ray. Inspect the service map to identify errors and issues.

Explanation

AWS X-Ray traces requests to analyze and debug distributed applications. This option needs the least custom development effort.

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

A company launched an online portal to announce a new product that the company will release in 6 months. The portal requests that users enter an email address to receive communications about the product. The company needs to create a REST API that will store the email addresses in Amazon DynamoDB. A developer has created an AWS Lambda function that can store the email addresses. The developer will deploy the Lambda function by using the AWS Serverless Application Model (AWS SAM). The developer must provide access to the Lambda function over HTTP. Which solutions will meet these requirements with the LEAST additional configuration? (Choose two.)

  • AExpose the Lambda function by using function URLs. (correct answer)
  • BExpose the Lambda function by using a Gateway Load Balancer.
  • CExpose the Lambda function by using a Network Load Balancer.
  • DExpose the Lambda function by using AWS Global Accelerator.
  • EExpose the Lambda function by using Amazon API Gateway. (correct answer)
Reveal answer & explanation
Correct answer: A, E

The correct answer is A, E. Option A: Expose the Lambda function by using function URLs. Option E: Expose the Lambda function by using Amazon API Gateway.

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 378

A company has a website that displays a daily newsletter. When a user visits the website, an AWS Lambda function processes the browser's request and queries the company's on-premises database to obtain the current newsletter. The newsletters are stored in English. The Lambda function uses the Amazon Translate TranslateText API operation to translate the newsletters, and the translation is displayed to the user. Due to an increase in popularity, the website's response time has slowed. The database is overloaded. The company cannot change the database and needs a solution that improves the response time of the Lambda function. Which solution meets these requirements?

  • AChange to asynchronous Lambda function invocation.
  • BCache the translated newsletters in the Lambda/tmp directory. (correct answer)
  • CEnable TranslateText API caching.
  • DChange the Lambda function to use parallel processing.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Cache the translated newsletters in the Lambda/tmp directory.

Explanation

AWS Lambda runs code without provisioning servers and scales automatically, which minimizes operational overhead. Amazon Translate provides neural machine translation.

Topic 1 Β· Question 379

A developer is monitoring an application that runs on an Amazon EC2 instance. The developer has configured a custom Amazon CloudWatch metric with data granularity of 1 second. If any issues occur, the developer wants to be notified within 30 seconds by Amazon Simple Notification Service (Amazon SNS). What should the developer do to meet this requirement?

  • AConfigure a high-resolution CloudWatch alarm. (correct answer)
  • BSet up a custom CloudWatch dashboard.
  • CUse Amazon CloudWatch Logs Insights.
  • DChange to a default CloudWatch metric.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Configure a high-resolution CloudWatch alarm.

Explanation

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 380

A company has a web application that contains an Amazon API Gateway REST API. A developer has created an AWS CloudFormation template for the initial deployment of the application. The developer has deployed the application successfully as part of an AWS CodePipeline continuous integration and continuous delivery (CI/CD) process. All resources and methods are available through the deployed stage endpoint. The CloudFormation template contains the following resource types: β€’ AWS::ApiGateway::RestApi β€’ AWS::ApiGateway::Resource β€’ AWS::ApiGateway::Method β€’ AWS::ApiGateway::Stage β€’ AWS::ApiGateway::Deployment The developer adds a new resource to the REST API with additional methods and redeploys the template. CloudFormation reports that the deployment is successful and that the stack is in the UPDATE_COMPLETE state. However, calls to all new methods are returning 404 (Not Found) errors. What should the developer do to make the new methods available?

  • ASpecify the disable-rollback option during the update-stack operation.
  • BUnset the CloudFormation stack failure options.
  • CAdd an AWS CodeBuild stage to CodePipeline to run the aws apigateway create-deployment AWS CLI command. (correct answer)
  • DAdd an action to CodePipeline to run the aws cloudfront create-invalidation AWS CLI command.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Add an AWS CodeBuild stage to CodePipeline to run the aws apigateway create-deployment AWS CLI command.

Explanation

AWS CodePipeline automates continuous delivery pipelines. AWS CodeBuild compiles, tests and packages code in a managed build service.

Showing questions 361–380 of 557 Β· Page 19 of 28