πŸ”

DVA-C02 β€” questions

Page 4 of 28 Β· 557 total questions.

Topic 1 Β· Question 61

A company is building a web application on AWS. When a customer sends a request, the application will generate reports and then make the reports available to the customer within one hour. Reports should be accessible to the customer for 8 hours. Some reports are larger than 1 MB. Each report is unique to the customer. The application should delete all reports that are older than 2 days. Which solution will meet these requirements with the LEAST operational overhead?

  • AGenerate the reports and then store the reports as Amazon DynamoDB items that have a specified TTL. Generate a URL that retrieves the reports from DynamoDB. Provide the URL to customers through the web application.
  • BGenerate the reports and then store the reports in an Amazon S3 bucket that uses server-side encryption. Attach the reports to an Amazon Simple Notification Service (Amazon SNS) message. Subscribe the customer to email notifications from Amazon SNS.
  • CGenerate the reports and then store the reports in an Amazon S3 bucket that uses server-side encryption. Generate a presigned URL that contains an expiration date Provide the URL to customers through the web application. Add S3 Lifecycle configuration rules to the S3 bucket to delete old reports. (correct answer)
  • DGenerate the reports and then store the reports in an Amazon RDS database with a date stamp. Generate an URL that retrieves the reports from the RDS database. Provide the URL to customers through the web application. Schedule an hourly AWS Lambda function to delete database records that have expired date stamps.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Generate the reports and then store the reports in an Amazon S3 bucket that uses server-side encryption. Generate a presigned URL that contains an expiration date Provide the URL to customers through the web applicati...

Explanation

S3 Lifecycle policies automatically transition or expire objects to control storage cost. Amazon S3 provides durable, scalable object storage that is fully managed. AWS Config tracks resource configuration changes and evaluates compliance.

Topic 1 Β· Question 62

A company has deployed an application on AWS Elastic Beanstalk. The company has configured the Auto Scaling group that is associated with the Elastic Beanstalk environment to have five Amazon EC2 instances. If the capacity is fewer than four EC2 instances during the deployment, application performance degrades. The company is using the all-at-once deployment policy. What is the MOST cost-effective way to solve the deployment issue?

  • AChange the Auto Scaling group to six desired instances.
  • BChange the deployment policy to traffic splitting. Specify an evaluation time of 1 hour.
  • CChange the deployment policy to rolling with additional batch. Specify a batch size of 1. (correct answer)
  • DChange the deployment policy to rolling. Specify a batch size of 2.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Change the deployment policy to rolling with additional batch. Specify a batch size of 1.

Explanation

AWS Batch schedules and runs batch computing jobs at any scale without managing clusters. This option delivers the requirement at the lowest cost.

Topic 1 Β· Question 63

A developer is incorporating AWS X-Ray into an application that handles personal identifiable information (PII). The application is hosted on Amazon EC2 instances. The application trace messages include encrypted PII and go to Amazon CloudWatch. The developer needs to ensure that no PII goes outside of the EC2 instances. Which solution will meet these requirements?

  • AManually instrument the X-Ray SDK in the application code. (correct answer)
  • BUse the X-Ray auto-instrumentation agent.
  • CUse Amazon Macie to detect and hide PII. Call the X-Ray API from AWS Lambda.
  • DUse AWS Distro for Open Telemetry.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Manually instrument the X-Ray SDK in the application code.

Explanation

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

Topic 1 Β· Question 64

A developer is migrating some features from a legacy monolithic application to use AWS Lambda functions instead. The application currently stores data in an Amazon Aurora DB cluster that runs in private subnets in a VPC. The AWS account has one VPC deployed. The Lambda functions and the DB cluster are deployed in the same AWS Region in the same AWS account. The developer needs to ensure that the Lambda functions can securely access the DB cluster without crossing the public internet. Which solution will meet these requirements?

  • AConfigure the DB cluster's public access setting to Yes.
  • BConfigure an Amazon RDS database proxy for he Lambda functions.
  • CConfigure a NAT gateway and a security group for the Lambda functions.
  • DConfigure the VPC, subnets, and a security group for the Lambda functions. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Configure the VPC, subnets, and a security group for the Lambda functions.

Explanation

AWS Lambda runs code without provisioning servers and scales automatically, which minimizes operational overhead. AWS Config tracks resource configuration changes and evaluates compliance.

Topic 1 Β· Question 65

A developer is building a new application on AWS. The application uses an AWS Lambda function that retrieves information from an Amazon DynamoDB table. The developer hard coded the DynamoDB table name into the Lambda function code. The table name might change over time. The developer does not want to modify the Lambda code if the table name changes. Which solution will meet these requirements MOST efficiently?

  • ACreate a Lambda environment variable to store the table name. Use the standard method for the programming language to retrieve the variable. (correct answer)
  • BStore the table name in a file. Store the file in the /tmp folder. Use the SDK for the programming language to retrieve the table name.
  • CCreate a file to store the table name. Zip the file and upload the file to the Lambda layer. Use the SDK for the programming language to retrieve the table name.
  • DCreate a global variable that is outside the handler in the Lambda function to store the table name.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Create a Lambda environment variable to store the table name. Use the standard method for the programming language to retrieve the variable.

Explanation

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

Topic 1 Β· Question 66

A company has a critical application on AWS. The application exposes an HTTP API by using Amazon API Gateway. The API is integrated with an AWS Lambda function. The application stores data in an Amazon RDS for MySQL DB instance with 2 virtual CPUs (vCPUs) and 64 GB of RAM. Customers have reported that some of the API calls return HTTP 500 Internal Server Error responses. Amazon CloudWatch Logs shows errors for β€œtoo many connections.” The errors occur during peak usage times that are unpredictable. The company needs to make the application resilient. The database cannot be down outside of scheduled maintenance hours. Which solution will meet these requirements?

  • ADecrease the number of vCPUs for the DB instance. Increase the max_connections setting.
  • BUse Amazon RDS Proxy to create a proxy that connects to the DB instance. Update the Lambda function to connect to the proxy. (correct answer)
  • CAdd a CloudWatch alarm that changes the DB instance class when the number of connections increases to more than 1,000.
  • DAdd an Amazon EventBridge rule that increases the max_connections setting of the DB instance when CPU utilization is above 75%.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Use Amazon RDS Proxy to create a proxy that connects to the DB instance. Update the Lambda function to connect to the proxy.

Explanation

AWS Lambda runs code without provisioning servers and scales automatically, which minimizes operational overhead. Amazon RDS Proxy pools and shares database connections to improve scalability and resilience. Amazon RDS is a managed relational database that handles patching, backups and failover. By spanning multiple Availability Zones / adding redundancy, this option provides the high availability and resilience required.

Topic 1 Β· Question 67

A company has installed smart meters in all its customer locations. The smart meters measure power usage at 1-minute intervals and send the usage readings to a remote endpoint for collection. The company needs to create an endpoint that will receive the smart meter readings and store the readings in a database. The company wants to store the location ID and timestamp information. The company wants to give its customers low-latency access to their current usage and historical usage on demand. The company expects demand to increase significantly. The solution must not impact performance or include downtime while scaling. Which solution will meet these requirements MOST cost-effectively?

  • AStore the smart meter readings in an Amazon RDS database. Create an index on the location ID and timestamp columns. Use the columns to filter on the customers' data.
  • BStore the smart meter readings in an Amazon DynamoDB table. Create a composite key by using the location ID and timestamp columns. Use the columns to filter on the customers' data. (correct answer)
  • CStore the smart meter readings in Amazon ElastiCache for Redis. Create a SortedSet key by using the location ID and timestamp columns. Use the columns to filter on the customers' data.
  • DStore the smart meter readings in Amazon S3. Partition the data by using the location ID and timestamp columns. Use Amazon Athena to filter on the customers' data.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Store the smart meter readings in an Amazon DynamoDB table. Create a composite key by using the location ID and timestamp columns. Use the columns to filter on the customers' data.

Explanation

Amazon DynamoDB is a fully managed, serverless NoSQL database with single-digit millisecond latency and automatic scaling. This option delivers the requirement at the lowest cost.

Topic 1 Β· Question 68

A company is building a serverless application that uses AWS Lambda functions. The company needs to create a set of test events to test Lambda functions in a development environment. The test events will be created once and then will be used by all the developers in an IAM developer group. The test events must be editable by any of the IAM users in the IAM developer group. Which solution will meet these requirements?

  • ACreate and store the test events in Amazon S3 as JSON objects. Allow S3 bucket access to all IAM users.
  • BCreate the test events. Configure the event sharing settings to make the test events shareable. (correct answer)
  • CCreate and store the test events in Amazon DynamoDB. Allow access to DynamoDB by using IAM roles.
  • DCreate the test events. Configure the event sharing settings to make the test events private.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Create the test events. Configure the event sharing settings to make the test events shareable.

Explanation

AWS Config tracks resource configuration changes and evaluates compliance.

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

A developer is configuring an application's deployment environment in AWS CodePipeline. The application code is stored in a GitHub repository. The developer wants to ensure that the repository package's unit tests run in the new deployment environment. The developer has already set the pipeline's source provider to GitHub and has specified the repository and branch to use in the deployment. Which combination of steps should the developer take next to meet these requirements with the LEAST overhead? (Choose two.)

  • ACreate an AWS CodeCommit project. Add the repository package's build and test commands to the project's buildspec.
  • BCreate an AWS CodeBuild project. Add the repository package's build and test commands to the project's buildspec. (correct answer)
  • CCreate an AWS CodeDeploy project. Add the repository package's build and test commands to the project's buildspec.
  • DAdd an action to the source stage. Specify the newly created project as the action provider. Specify the build artifact as the action's input artifact.
  • EAdd a new stage to the pipeline after the source stage. Add an action to the new stage. Specify the newly created project as the action provider. Specify the source artifact as the action's input artifact. (correct answer)
Reveal answer & explanation
Correct answer: B, E

The correct answer is B, E. Option B: Create an AWS CodeBuild project. Add the repository package's build and test commands to the project's buildspec. Option E: Add a new stage to the pipeline after the source stage. Add an action to the new stage. Specify the newly created project as the action provider. Specify the source artifact as the action's input artifact.

Explanation

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

Topic 1 Β· Question 70

An engineer created an A/B test of a new feature on an Amazon CloudWatch Evidently project. The engineer configured two variations of the feature (Variation A and Variation B) for the test. The engineer wants to work exclusively with Variation A. The engineer needs to make updates so that Variation A is the only variation that appears when the engineer hits the application's endpoint. Which solution will meet this requirement?

  • AAdd an override to the feature. Set the identifier of the override to the engineer's user ID. Set the variation to Variation A. (correct answer)
  • BAdd an override to the feature. Set the identifier of the override to Variation A. Set the variation to 100%.
  • CAdd an experiment to the project. Set the identifier of the experiment to Variation B. Set the variation to 0%.
  • DAdd an experiment to the project. Set the identifier of the experiment to the AWS account's account ISet the variation to Variation A.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Add an override to the feature. Set the identifier of the override to the engineer's user ID. Set the variation to Variation A.

Topic 1 Β· Question 71

A developer is working on an existing application that uses Amazon DynamoDB as its data store. The DynamoDB table has the following attributes: partNumber (partition key), vendor (sort key), description, productFamily, and productType. When the developer analyzes the usage patterns, the developer notices that there are application modules that frequently look for a list of products based on the productFamily and productType attributes. The developer wants to make changes to the application to improve performance of the query operations. Which solution will meet these requirements?

  • ACreate a global secondary index (GSI) with productFamily as the partition key and productType as the sort key. (correct answer)
  • BCreate a local secondary index (LSI) with productFamily as the partition key and productType as the sort key.
  • CRecreate the table. Add partNumber as the partition key and vendor as the sort key. During table creation, add a local secondary index (LSI) with productFamily as the partition key and productType as the sort key.
  • DUpdate the queries to use Scan operations with productFamily as the partition key and productType as the sort key.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Create a global secondary index (GSI) with productFamily as the partition key and productType as the sort key.

Topic 1 Β· Question 72

A developer creates a VPC named VPC-A that has public and private subnets. The developer also creates an Amazon RDS database inside the private subnet of VPC-A. To perform some queries, the developer creates an AWS Lambda function in the default VPC. The Lambda function has code to access the RDS database. When the Lambda function runs, an error message indicates that the function cannot connect to the RDS database. How can the developer solve this problem?

  • AModify the RDS security group. Add a rule to allow traffic from all the ports from the VPC CIDR block.
  • BRedeploy the Lambda function in the same subnet as the RDS instance. Ensure that the RDS security group allows traffic from the Lambda function. (correct answer)
  • CCreate a security group for the Lambda function. Add a new rule in the RDS security group to allow traffic from the new Lambda security group.
  • DCreate an IAM role. Attach a policy that allows access to the RDS database. Attach the role to the Lambda function.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Redeploy the Lambda function in the same subnet as the RDS instance. Ensure that the RDS security group allows traffic from the Lambda function.

Explanation

AWS Lambda runs code without provisioning servers and scales automatically, which minimizes operational overhead. Amazon RDS is a managed relational database that handles patching, backups and failover.

Topic 1 Β· Question 73

A company runs an application on AWS. The company deployed the application on Amazon EC2 instances. The application stores data on Amazon Aurora. The application recently logged multiple application-specific custom DECRYP_ERROR errors to Amazon CloudWatch logs. The company did not detect the issue until the automated tests that run every 30 minutes failed. A developer must implement a solution that will monitor for the custom errors and alert a development team in real time when these errors occur in the production environment. Which solution will meet these requirements with the LEAST operational overhead?

  • AConfigure the application to create a custom metric and to push the metric to CloudWatch. Create an AWS CloudTrail alarm. Configure the CloudTrail alarm to use an Amazon Simple Notification Service (Amazon SNS) topic to send notifications.
  • BCreate an AWS Lambda function to run every 5 minutes to scan the CloudWatch logs for the keyword DECRYP_ERROR. Configure the Lambda function to use Amazon Simple Notification Service (Amazon SNS) to send a notification.
  • CUse Amazon CloudWatch Logs to create a metric filter that has a filter pattern for DECRYP_ERROR. Create a CloudWatch alarm on this metric for a threshold >=1. Configure the alarm to send Amazon Simple Notification Service (Amazon SNS) notifications. (correct answer)
  • DInstall the CloudWatch unified agent on the EC2 instance. Configure the application to generate a metric for the keyword DECRYP_ERROR errors. Configure the agent to send Amazon Simple Notification Service (Amazon SNS) notifications.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Use Amazon CloudWatch Logs to create a metric filter that has a filter pattern for DECRYP_ERROR. Create a CloudWatch alarm on this metric for a threshold >=1. Configure the alarm to send Amazon Simple Notification Ser...

Explanation

Amazon SNS is a managed pub/sub service for fan-out notifications to many subscribers. 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 74

A developer created an AWS Lambda function that accesses resources in a VPC. The Lambda function polls an Amazon Simple Queue Service (Amazon SQS) queue for new messages through a VPC endpoint. Then the function calculates a rolling average of the numeric values that are contained in the messages. After initial tests of the Lambda function, the developer found that the value of the rolling average that the function returned was not accurate. How can the developer ensure that the function calculates an accurate rolling average?

  • ASet the function's reserved concurrency to 1. Calculate the rolling average in the function. Store the calculated rolling average in Amazon ElastiCache. (correct answer)
  • BModify the function to store the values in Amazon ElastiCache. When the function initializes, use the previous values from the cache to calculate the rolling average.
  • CSet the function's provisioned concurrency to 1. Calculate the rolling average in the function. Store the calculated rolling average in Amazon ElastiCache.
  • DModify the function to store the values in the function's layers. When the function initializes, use the previously stored values to calculate the rolling average.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Set the function's reserved concurrency to 1. Calculate the rolling average in the function. Store the calculated rolling average in Amazon ElastiCache.

Explanation

Amazon ElastiCache provides in-memory caching (Redis/Memcached) to reduce latency and offload the database.

Topic 1 Β· Question 75

A developer is writing unit tests for a new application that will be deployed on AWS. The developer wants to validate all pull requests with unit tests and merge the code with the main branch only when all tests pass.

The developer stores the code in AWS CodeCommit and sets up AWS CodeBuild to run the unit tests. The developer creates an AWS Lambda function to start the CodeBuild task. The developer needs to identify the CodeCommit events in an Amazon EventBridge event that can invoke the Lambda function when a pull request is created or updated.

Which CodeCommit event will meet these requirements?

  • AOption A for question 75
  • BOption B for question 75
  • COption C for question 75 (correct answer)
  • DOption D for question 75
Reveal answer & explanation
Correct answer: C

The correct answer is C. Compare the policy/code shown in each option image.

Topic 1 Β· Question 76

A developer deployed an application to an Amazon EC2 instance. The application needs to know the public IPv4 address of the instance. How can the application find this information?

  • AQuery the instance metadata from http://169.254.169.254/latest/meta-data/. (correct answer)
  • BQuery the instance user data from http://169.254.169.254/latest/user-data/.
  • CQuery the Amazon Machine Image (AMI) information from http://169.254.169.254/latest/meta-data/ami/.
  • DCheck the hosts file of the operating system.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Query the instance metadata from http://169.254.169.254/latest/meta-data/.

Topic 1 Β· Question 77

An application under development is required to store hundreds of video files. The data must be encrypted within the application prior to storage, with a unique key for each video file. How should the developer code the application?

  • AUse the KMS Encrypt API to encrypt the data. Store the encrypted data key and data.
  • BUse a cryptography library to generate an encryption key for the application. Use the encryption key to encrypt the data. Store the encrypted data.
  • CUse the KMS GenerateDataKey API to get a data key. Encrypt the data with the data key. Store the encrypted data key and data. (correct answer)
  • DUpload the data to an S3 bucket using server side-encryption with an AWS KMS key.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Use the KMS GenerateDataKey API to get a data key. Encrypt the data with the data key. Store the encrypted data key and data.

Explanation

AWS KMS manages encryption keys and integrates with most AWS services for encryption at rest.

Topic 1 Β· Question 78

A company is planning to deploy an application on AWS behind an Elastic Load Balancer. The application uses an HTTP/HTTPS listener and must access the client IP addresses. Which load-balancing solution meets these requirements?

  • AUse an Application Load Balancer and the X-Forwarded-For headers. (correct answer)
  • BUse a Network Load Balancer (NLB). Enable proxy protocol support on the NLB and the target application.
  • CUse an Application Load Balancer. Register the targets by the instance ID.
  • DUse a Network Load Balancer and the X-Forwarded-For headers.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Use an Application Load Balancer and the X-Forwarded-For headers.

Explanation

An Application Load Balancer distributes HTTP/HTTPS traffic and supports path/host routing. A load balancer distributes traffic across targets in multiple AZs for availability and scale.

Topic 1 Β· Question 79

A developer wants to debug an application by searching and filtering log data. The application logs are stored in Amazon CloudWatch Logs. The developer creates a new metric filter to count exceptions in the application logs. However, no results are returned from the logs. What is the reason that no filtered results are being returned?

  • AA setup of the Amazon CloudWatch interface VPC endpoint is required for filtering the CloudWatch Logs in the VPC.
  • BCloudWatch Logs only publishes metric data for events that happen after the filter is created. (correct answer)
  • CThe log group for CloudWatch Logs should be first streamed to Amazon OpenSearch Service before metric filtering returns the results.
  • DMetric data points for logs groups can be filtered only after they are exported to an Amazon S3 bucket.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: CloudWatch Logs only publishes metric data for events that happen after the filter is created.

Explanation

Amazon CloudWatch collects metrics, logs and alarms to monitor and react to operational health.

Topic 1 Β· Question 80

A company is planning to use AWS CodeDeploy to deploy an application to Amazon Elastic Container Service (Amazon ECS). During the deployment of a new version of the application, the company initially must expose only 10% of live traffic to the new version of the deployed application. Then, after 15 minutes elapse, the company must route all the remaining live traffic to the new version of the deployed application. Which CodeDeploy predefined configuration will meet these requirements?

  • ACodeDeployDefault.ECSCanary10Percent15Minutes (correct answer)
  • BCodeDeployDefault.LambdaCanary10Percent5Minutes
  • CCodeDeployDefault.LambdaCanary10Percentl15Minutes
  • DCodeDeployDefault.ECSLinear10PercentEvery1Minutes
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: CodeDeployDefault.ECSCanary10Percent15Minutes

Explanation

Amazon ECS orchestrates containers and integrates natively with AWS networking and IAM. AWS CodeDeploy automates application deployments to compute services.

Showing questions 61–80 of 557 Β· Page 4 of 28