πŸ”

DVA-C02 β€” questions

Page 5 of 28 Β· 557 total questions.

Topic 1 Β· Question 81

A company hosts a batch processing application on AWS Elastic Beanstalk with instances that run the most recent version of Amazon Linux. The application sorts and processes large datasets. In recent weeks, the application's performance has decreased significantly during a peak period for traffic. A developer suspects that the application issues are related to the memory usage. The developer checks the Elastic Beanstalk console and notices that memory usage is not being tracked. How should the developer gather more information about the application performance issues?

  • AConfigure the Amazon CloudWatch agent to push logs to Amazon CloudWatch Logs by using port 443.
  • BConfigure the Elastic Beanstalk .ebextensions directory to track the memory usage of the instances.
  • CConfigure the Amazon CloudWatch agent to track the memory usage of the instances. (correct answer)
  • DConfigure an Amazon CloudWatch dashboard to track the memory usage of the instances.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Configure the Amazon CloudWatch agent to track the memory usage of the instances.

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 82

A developer is building a highly secure healthcare application using serverless components. This application requires writing temporary data to /tmp storage on an AWS Lambda function. How should the developer encrypt this data?

  • AEnable Amazon EBS volume encryption with an AWS KMS key in the Lambda function configuration so that all storage attached to the Lambda function is encrypted.
  • BSet up the Lambda function with a role and key policy to access an AWS KMS key. Use the key to generate a data key used to encrypt all data prior to writing to /tmp storage. (correct answer)
  • CUse OpenSSL to generate a symmetric encryption key on Lambda startup. Use this key to encrypt the data prior to writing to /tmp.
  • DUse an on-premises hardware security module (HSM) to generate keys, where the Lambda function requests a data key from the HSM and uses that to encrypt data on all requests to the function.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Set up the Lambda function with a role and key policy to access an AWS KMS key. Use the key to generate a data key used to encrypt all data prior to writing to /tmp storage.

Explanation

AWS Lambda runs code without provisioning servers and scales automatically, which minimizes operational overhead. AWS KMS manages encryption keys and integrates with most AWS services for encryption at rest.

Topic 1 Β· Question 83

A developer has created an AWS Lambda function to provide notification through Amazon Simple Notification Service (Amazon SNS) whenever a file is uploaded to Amazon S3 that is larger than 50 MB. The developer has deployed and tested the Lambda function by using the CLI. However, when the event notification is added to the S3 bucket and a 3,000 MB file is uploaded, the Lambda function does not launch. Which of the following is a possible reason for the Lambda function's inability to launch?

  • AThe S3 event notification does not activate for files that are larger than 1,000 MB.
  • BThe resource-based policy for the Lambda function does not have the required permissions to be invoked by Amazon S3. (correct answer)
  • CLambda functions cannot be invoked directly from an S3 event.
  • DThe S3 bucket needs to be made public.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: The resource-based policy for the Lambda function does not have the required permissions to be invoked by Amazon S3.

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 84

A developer is creating a Ruby application and needs to automate the deployment, scaling, and management of an environment without requiring knowledge of the underlying infrastructure. Which service would best accomplish this task?

  • AAWS CodeDeploy
  • BAWS CloudFormation
  • CAWS OpsWorks
  • DAWS Elastic Beanstalk (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: AWS Elastic Beanstalk

Explanation

AWS Elastic Beanstalk provisions and manages the underlying environment for you with little operational effort.

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

A company has a web application that is deployed on AWS. The application uses an Amazon API Gateway API and an AWS Lambda function as its backend. The application recently demonstrated unexpected behavior. A developer examines the Lambda function code, finds an error, and modifies the code to resolve the problem. Before deploying the change to production, the developer needs to run tests to validate that the application operates properly. The application has only a production environment available. The developer must create a new development environment to test the code changes. The developer must also prevent other developers from overwriting these changes during the test cycle. Which combination of steps will meet these requirements with the LEAST development effort? (Choose two.)

  • ACreate a new resource in the current stage. Create a new method with Lambda proxy integration. Select the Lambda function. Add the hotfix alias. Redeploy the current stage. Test the backend.
  • BUpdate the Lambda function in the API Gateway API integration request to use the hotfix alias. Deploy the API Gateway API to a new stage named hotfix. Test the backend. (correct answer)
  • CModify the Lambda function by fixing the code. Test the Lambda function. Create the alias hotfix. Point the alias to the $LATEST version.
  • DModify the Lambda function by fixing the code. Test the Lambda function. When the Lambda function is working as expected, publish the Lambda function as a new version. Create the alias hotfix. Point the alias to the new version. (correct answer)
  • ECreate a new API Gateway API for the development environment. Add a resource and method with Lambda integration. Choose the Lambda function and the hotfix alias. Deploy to a new stage. Test the backend.
Reveal answer & explanation
Correct answer: B, D

The correct answer is B, D. Option B: Update the Lambda function in the API Gateway API integration request to use the hotfix alias. Deploy the API Gateway API to a new stage named hotfix. Test the backend. Option D: Modify the Lambda function by fixing the code. Test the Lambda function. When the Lambda function is working as expected, publish the Lambda function as a new version. Create the alias hotfix. Point the alias to the n...

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. This option needs the least custom development effort.

Topic 1 Β· Question 86

A developer is implementing an AWS Cloud Development Kit (AWS CDK) serverless application. The developer will provision several AWS Lambda functions and Amazon API Gateway APIs during AWS CloudFormation stack creation. The developer's workstation has the AWS Serverless Application Model (AWS SAM) and the AWS CDK installed locally. How can the developer test a specific Lambda function locally?

  • ARun the sam package and sam deploy commands. Create a Lambda test event from the AWS Management Console. Test the Lambda function.
  • BRun the cdk synth and cdk deploy commands. Create a Lambda test event from the AWS Management Console. Test the Lambda function.
  • CRun the cdk synth and sam local invoke commands with the function construct identifier and the path to the synthesized CloudFormation template. (correct answer)
  • DRun the cdk synth and sam local start-lambda commands with the function construct identifier and the path to the synthesized CloudFormation template.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Run the cdk synth and sam local invoke commands with the function construct identifier and the path to the synthesized CloudFormation template.

Explanation

AWS CloudFormation provisions infrastructure as code repeatably. The AWS CDK defines cloud infrastructure as code using familiar programming languages.

Topic 1 Β· Question 87

A company's new mobile app uses Amazon API Gateway. As the development team completes a new release of its APIs, a developer must safely and transparently roll out the API change. What is the SIMPLEST solution for the developer to use for rolling out the new API version to a limited number of users through API Gateway?

  • ACreate a new API in API Gateway. Direct a portion of the traffic to the new API using an Amazon Route 53 weighted routing policy.
  • BValidate the new API version and promote it to production during the window of lowest expected utilization.
  • CImplement an Amazon CloudWatch alarm to trigger a rollback if the observed HTTP 500 status code rate exceeds a predetermined threshold.
  • DUse the canary release deployment option in API Gateway. Direct a percentage of the API traffic using the canarySettings setting. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Use the canary release deployment option in API Gateway. Direct a percentage of the API traffic using the canarySettings setting.

Explanation

Amazon API Gateway is a fully managed front door for creating and securing APIs at scale.

Topic 1 Β· Question 88

A company caches session information for a web application in an Amazon DynamoDB table. The company wants an automated way to delete old items from the table. What is the simplest way to do this?

  • AWrite a script that deletes old records; schedule the script as a cron job on an Amazon EC2 instance.
  • BAdd an attribute with the expiration time; enable the Time To Live feature based on that attribute. (correct answer)
  • CEach day, create a new table to hold session data; delete the previous day's table.
  • DAdd an attribute with the expiration time; name the attribute ItemExpiration.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Add an attribute with the expiration time; enable the Time To Live feature based on that attribute.

Topic 1 Β· Question 89

A company is using an Amazon API Gateway REST API endpoint as a webhook to publish events from an on-premises source control management (SCM) system to Amazon EventBridge. The company has configured an EventBridge rule to listen for the events and to control application deployment in a central AWS account. The company needs to receive the same events across multiple receiver AWS accounts. How can a developer meet these requirements without changing the configuration of the SCM system?

  • ADeploy the API Gateway REST API to all the required AWS accounts. Use the same custom domain name for all the gateway endpoints so that a single SCM webhook can be used for all events from all accounts.
  • BDeploy the API Gateway REST API to all the receiver AWS accounts. Create as many SCM webhooks as the number of AWS accounts.
  • CGrant permission to the central AWS account for EventBridge to access the receiver AWS accounts. Add an EventBridge event bus on the receiver AWS accounts as the targets to the existing EventBridge rule. (correct answer)
  • DConvert the API Gateway type from REST API to HTTP API.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Grant permission to the central AWS account for EventBridge to access the receiver AWS accounts. Add an EventBridge event bus on the receiver AWS accounts as the targets to the existing EventBridge rule.

Explanation

Amazon EventBridge routes events between services with rules, enabling event-driven, decoupled architectures.

Topic 1 Β· Question 90

A company moved some of its secure files to a private Amazon S3 bucket that has no public access. The company wants to develop a serverless application that gives its employees the ability to log in and securely share the files with other users. Which AWS feature should the company use to share and access the files securely?

  • AAmazon Cognito user pool
  • BS3 presigned URLs (correct answer)
  • CS3 bucket policy
  • DAmazon Cognito identity pool
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: S3 presigned URLs

Explanation

Amazon S3 provides durable, scalable object storage that is fully managed.

Topic 1 Β· Question 91

A company needs to develop a proof of concept for a web service application. The application will show the weather forecast for one of the company's office locations. The application will provide a REST endpoint that clients can call. Where possible, the application should use caching features provided by AWS to limit the number of requests to the backend service. The application backend will receive a small amount of traffic only during testing. Which approach should the developer take to provide the REST endpoint MOST cost-effectively?

  • ACreate a container image. Deploy the container image by using Amazon Elastic Kubernetes Service (Amazon EKS). Expose the functionality by using Amazon API Gateway.
  • BCreate an AWS Lambda function by using the AWS Serverless Application Model (AWS SAM). Expose the Lambda functionality by using Amazon API Gateway. (correct answer)
  • CCreate a container image. Deploy the container image by using Amazon Elastic Container Service (Amazon ECS). Expose the functionality by using Amazon API Gateway.
  • DCreate a microservices application. Deploy the application to AWS Elastic Beanstalk. Expose the AWS Lambda functionality by using an Application Load Balancer.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Create an AWS Lambda function by using the AWS Serverless Application Model (AWS SAM). Expose the Lambda functionality 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. This option delivers the requirement at the lowest cost.

Topic 1 Β· Question 92

An e-commerce web application that shares session state on-premises is being migrated to AWS. The application must be fault tolerant, natively highly scalable, and any service interruption should not affect the user experience. What is the best option to store the session state?

  • AStore the session state in Amazon ElastiCache. (correct answer)
  • BStore the session state in Amazon CloudFront.
  • CStore the session state in Amazon S3.
  • DEnable session stickiness using elastic load balancers.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Store the session state in Amazon ElastiCache.

Explanation

Amazon ElastiCache provides in-memory caching (Redis/Memcached) to reduce latency and offload the database. By spanning multiple Availability Zones / adding redundancy, this option provides the high availability and resilience required.

Topic 1 Β· Question 93

A developer is building an application that uses Amazon DynamoDB. The developer wants to retrieve multiple specific items from the database with a single API call. Which DynamoDB API call will meet these requirements with the MINIMUM impact on the database?

  • ABatchGetItem (correct answer)
  • BGetItem
  • CScan
  • DQuery
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: BatchGetItem

Explanation

AWS Batch schedules and runs batch computing jobs at any scale without managing clusters.

Topic 1 Β· Question 94

A developer has written an application that runs on Amazon EC2 instances. The developer is adding functionality for the application to write objects to an Amazon S3 bucket. Which policy must the developer modify to allow the instances to write these objects?

  • AThe IAM policy that is attached to the EC2 instance profile role (correct answer)
  • BThe session policy that is applied to the EC2 instance role session
  • CThe AWS Key Management Service (AWS KMS) key policy that is attached to the EC2 instance profile role
  • DThe Amazon VPC endpoint policy
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: The IAM policy that is attached to the EC2 instance profile role

Explanation

Amazon EC2 provides resizable virtual servers when you need full control of the operating system. AWS IAM controls authenticated and authorized access to AWS resources with fine-grained policies.

Topic 1 Β· Question 95

A developer is leveraging a Border Gateway Protocol (BGP)-based AWS VPN connection to connect from on-premises to Amazon EC2 instances in the developer's account. The developer is able to access an EC2 instance in subnet A, but is unable to access an EC2 instance in subnet B in the same VPC. Which logs can the developer use to verify whether the traffic is reaching subnet B?

  • AVPN logs
  • BBGP logs
  • CVPC Flow Logs (correct answer)
  • DAWS CloudTrail logs
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: VPC Flow Logs.

Topic 1 Β· Question 96

A developer is creating a service that uses an Amazon S3 bucket for image uploads. The service will use an AWS Lambda function to create a thumbnail of each image. Each time an image is uploaded, the service needs to send an email notification and create the thumbnail. The developer needs to configure the image processing and email notifications setup. Which solution will meet these requirements?

  • ACreate an Amazon Simple Notification Service (Amazon SNS) topic. Configure S3 event notifications with a destination of the SNS topic. Subscribe the Lambda function to the SNS topic. Create an email notification subscription to the SNS topic. (correct answer)
  • BCreate an Amazon Simple Notification Service (Amazon SNS) topic. Configure S3 event notifications with a destination of the SNS topic. Subscribe the Lambda function to the SNS topic. Create an Amazon Simple Queue Service (Amazon SQS) queue. Subscribe the SQS queue to the SNS topic. Create an email notification subscription to the SQS queue.
  • CCreate an Amazon Simple Queue Service (Amazon SQS) queue. Configure S3 event notifications with a destination of the SQS queue. Subscribe the Lambda function to the SQS queue. Create an email notification subscription to the SQS queue.
  • DCreate an Amazon Simple Queue Service (Amazon SQS) queue. Send S3 event notifications to Amazon EventBridge. Create an EventBridge rule that runs the Lambda function when images are uploaded to the S3 bucket. Create an EventBridge rule that sends notifications to the SQS queue. Create an email notification subscription to the SQS queue.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Create an Amazon Simple Notification Service (Amazon SNS) topic. Configure S3 event notifications with a destination of the SNS topic. Subscribe the Lambda function to the SNS topic. Create an email notification subsc...

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

Topic 1 Β· Question 97

A developer has designed an application to store incoming data as JSON files in Amazon S3 objects. Custom business logic in an AWS Lambda function then transforms the objects, and the Lambda function loads the data into an Amazon DynamoDB table. Recently, the workload has experienced sudden and significant changes in traffic. The flow of data to the DynamoDB table is becoming throttled. The developer needs to implement a solution to eliminate the throttling and load the data into the DynamoDB table more consistently. Which solution will meet these requirements?

  • ARefactor the Lambda function into two functions. Configure one function to transform the data and one function to load the data into the DynamoDB table. Create an Amazon Simple Queue Service (Amazon SQS) queue in between the functions to hold the items as messages and to invoke the second function. (correct answer)
  • BTurn on auto scaling for the DynamoDB table. Use Amazon CloudWatch to monitor the table's read and write capacity metrics and to track consumed capacity.
  • CCreate an alias for the Lambda function. Configure provisioned concurrency for the application to use.
  • DRefactor the Lambda function into two functions. Configure one function to store the data in the DynamoDB table. Configure the second function to process the data and update the items after the data is stored in DynamoDB. Create a DynamoDB stream to invoke the second function after the data is stored.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Refactor the Lambda function into two functions. Configure one function to transform the data and one function to load the data into the DynamoDB table. Create an Amazon Simple Queue Service (Amazon SQS) queue in betw...

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. Amazon SQS is a fully managed message queue that decouples components and absorbs traffic spikes.

Topic 1 Β· Question 98

A developer is creating an AWS Lambda function in VPC mode. An Amazon S3 event will invoke the Lambda function when an object is uploaded into an S3 bucket. The Lambda function will process the object and produce some analytic results that will be recorded into a file. Each processed object will also generate a log entry that will be recorded into a file. Other Lambda functions, AWS services, and on-premises resources must have access to the result files and log file. Each log entry must also be appended to the same shared log file. The developer needs a solution that can share files and append results into an existing file. Which solution should the developer use to meet these requirements?

  • ACreate an Amazon Elastic File System (Amazon EFS) file system. Mount the EFS file system in Lambda. Store the result files and log file in the mount point. Append the log entries to the log file. (correct answer)
  • BCreate an Amazon Elastic Block Store (Amazon EBS) Multi-Attach enabled volume. Attach the EBS volume to all Lambda functions. Update the Lambda function code to download the log file, append the log entries, and upload the modified log file to Amazon EBS.
  • CCreate a reference to the /tmp local directory. Store the result files and log file by using the directory reference. Append the log entry to the log file.
  • DCreate a reference to the /opt storage directory. Store the result files and log file by using the directory reference. Append the log entry to the log file.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Create an Amazon Elastic File System (Amazon EFS) file system. Mount the EFS file system in Lambda. Store the result files and log file in the mount point. Append the log entries to the log file.

Explanation

AWS Lambda runs code without provisioning servers and scales automatically, which minimizes operational overhead. Amazon EFS is a shared, elastic NFS file system that multiple instances can mount concurrently across AZs.

Topic 1 Β· Question 99

A company has an AWS Lambda function that processes incoming requests from an Amazon API Gateway API. The API calls the Lambda function by using a Lambda alias. A developer updated the Lambda function code to handle more details related to the incoming requests. The developer wants to deploy the new Lambda function for more testing by other developers with no impact to customers that use the API. Which solution will meet these requirements with the LEAST operational overhead?

  • ACreate a new version of the Lambda function. Create a new stage on API Gateway with integration to the new Lambda version. Use the new API Gateway stage to test the Lambda function. (correct answer)
  • BUpdate the existing Lambda alias used by API Gateway to a weighted alias. Add the new Lambda version as an additional Lambda function with a weight of 10%. Use the existing API Gateway stage for testing.
  • CCreate a new version of the Lambda function. Create and deploy a second Lambda function to filter incoming requests from API Gateway. If the filtering Lambda function detects a test request, the filtering Lambda function will invoke the new Lambda version of the code. For other requests, the filtering Lambda function will invoke the old Lambda version. Update the API Gateway API to use the filtering Lambda function.
  • DCreate a new version of the Lambda function. Create a new API Gateway API for testing purposes. Update the integration of the new API with the new Lambda version. Use the new API for testing.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Create a new version of the Lambda function. Create a new stage on API Gateway with integration to the new Lambda version. Use the new API Gateway stage to test the Lambda function.

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 100

A company uses AWS Lambda functions and an Amazon S3 trigger to process images into an S3 bucket. A development team set up multiple environments in a single AWS account. After a recent production deployment, the development team observed that the development S3 buckets invoked the production environment Lambda functions. These invocations caused unwanted execution of development S3 files by using production Lambda functions. The development team must prevent these invocations. The team must follow security best practices. Which solution will meet these requirements?

  • AUpdate the Lambda execution role for the production Lambda function to add a policy that allows the execution role to read from only the production environment S3 bucket.
  • BMove the development and production environments into separate AWS accounts. Add a resource policy to each Lambda function to allow only S3 buckets that are within the same account to invoke the function. (correct answer)
  • CAdd a resource policy to the production Lambda function to allow only the production environment S3 bucket to invoke the function.
  • DMove the development and production environments into separate AWS accounts. Update the Lambda execution role for each function to add a policy that allows the execution role to read from the S3 bucket that is within the same account.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Move the development and production environments into separate AWS accounts. Add a resource policy to each Lambda function to allow only S3 buckets that are within the same account to invoke the function.

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.

Showing questions 81–100 of 557 Β· Page 5 of 28