Spring Sale Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: 70track

Free Amazon Web Services DVA-C02 Practice Exam with Questions & Answers | Set: 8

Questions 106

A developer writes an AWS Lambda function that processes new object uploads to an Amazon S3 bucket. The Lambda function runs for approximately 30 seconds. The function runs as expected under normal load conditions. Other Lambda functions in the AWS account also run as expected.

Occasionally, up to 500 new objects are written to the bucket every minute. Each new object write invokes the processing Lambda function during the high-volume periods through an event notification.

The developer must ensure that the processing function continues to run as expected during the high-volume periods.

Which solution will meet this requirement?

Options:
A.

Modify the function's timeout setting.

B.

Add an additional Lambda layer to optimize the code execution.

C.

Configure a reserved concurrency quota for the function.

D.

Decrease the function's memory allocation.

Amazon Web Services DVA-C02 Premium Access
Questions 107

A developer is building a multi-tenant application using AWS Lambda, Amazon S3, and Amazon DynamoDB. Each S3 object prefix represents a tenant name, and DynamoDB uses the tenant name as the partition key.

The developer must prevent cross-tenant data access during processing.

Which combination of actions will meet this requirement? (Select THREE.)

Options:
A.

Create a data access IAM role that allows the sts:TagSession action.

B.

Allow the Lambda execution role to assume the data access role.

C.

Configure IAM policies on the data access role to allow S3 and DynamoDB access only when resource attributes match the tenant session tag.

D.

Create a resource-based policy on DynamoDB based on principal tags.

E.

Create a resource control policy (RCP) for the S3 bucket.

F.

Configure the Lambda function to assume the data access role and pass the tenant name as a session tag.

Questions 108

A developer is working on an AWS Lambda function that accesses Amazon DynamoDB. The Lambda function must retrieve an item and update some of its attributes, or create the item if it does not exist. The Lambda function has access to the primary key.

Which IAM permissions should the developer request for the Lambda function to achieve this functionality?

A)

B)

C)

D)

Options:
A.

Option A

B.

Option B

C.

Option C

D.

Option D

Questions 109

A developer is designing an event-driven architecture. An AWS Lambda function that processes data needs to push processed data to a subset of four consumer Lambda functions. The data must be routed based on the value of one field in the data.

Which solution will meet these requirements with the LEAST operational overhead?

Options:
A.

Create an Amazon Simple Queue Service {Amazon SQS) queue and even! source mapping for each consumer Lambda function. Add message routing logic to the data-processing Lambda function.

B.

Create an Amazon Simple Notification Service (Amazon SNS) topic. Subscribe the four consumer Lambda functions to the topic. Add message filtering logic to each consumer Lambda function. Subscribe the data-processing Lambda function to the SNS topic.

C.

Create a separate Amazon Simple Notification Service (Amazon SNS) topic and subscription for each consumer Lambda function. Add message routing logic to the data-processing Lambda function to publish to the appropriate topic.

D.

Create a single Amazon Simple Notification Service {Amazon SNS) topic. Subscribe the four consumer Lambda functions to the topic. Add SNS subscription filter policies to each subscription. Configure the data-processing Lambda function to publish to the topic.

Questions 110

An application uses an Amazon EC2 Auto Scaling group. A developer notices that EC2 instances are taking a long time to become available during scale-out events. The UserData script is taking a long time to run.

The developer must implement a solution to decrease the time that elapses before an EC2 instance becomes available. The solution must make the most recent version of the application available at all times and must apply all available security updates. The solution also must minimize the number of images that are created. The images must be validated.

Which combination of steps should the developer take to meet these requirements? (Choose two.)

Options:
A.

Use EC2 Image Builder to create an Amazon Machine Image (AMI). Install all the patches and agents that are needed to manage and run the application. Update the Auto Scaling group launch configuration to use the AMI.

B.

Use EC2 Image Builder to create an Amazon Machine Image (AMI). Install the latest version of the application and all the patches and agents that are needed to manage and run the application. Update the Auto Scaling group launch configuration to use the AMI.

C.

Set up AWS CodeDeploy to deploy the most recent version of the application at runtime.

D.

Set up AWS CodePipeline to deploy the most recent version of the application at runtime.

E.

Remove any commands that perform operating system patching from the UserData script.

Questions 111

A company uses more than 100 AWS Lambda functions to handle application services. One Lambda function is critical and must always run successfully. The company notices that occasionally, the critical Lambda function does not initiate. The company investigates the issue and discovers instances of the Lambda TooManyRequestsException: Rate Exceeded error in Amazon CloudWatch logs. Upon further review of the logs, the company notices that some of the non-critical functions run properly while the critical function fails. A developer must resolve the errors and ensure that the critical Lambda function runs successfully. Which solution will meet these requirements with the LEAST operational overhead?

Options:
A.

Configure reserved concurrency for the critical Lambda function. Set reserved concurrent executions to the appropriate level.

B.

Configure provisioned concurrency for the critical Lambda function. Set provisioned concurrent executions to the appropriate level.

C.

Configure CloudWatch alarms for TooManyRequestsException errors. Add the critical Lambda function as an alarm state change action to invoke the critical function again after a failure.

D.

Configure CloudWatch alarms for TooManyRequestsException errors. Add Amazon EventBridge as an action for the alarm state change. Use EventBridge to invoke the critical function again after a failure.

Questions 112

A company is launching a photo sharing application on AWS. Users use the application to upload images to an Amazon S3 bucket. When users upload images, an AWS Lambda function creates thumbnail versions of the images and stores the thumbnail versions in another S3 bucket.

During development, a developer notices that the Lambda function takes more than 2 minutes to complete the thumbnail process. The company needs all images to be processed in less than 30 seconds.

What should the developer do to meet these requirements?

Options:
A.

Increase the virtual CPUs (vCPUs) for the Lambda function to use 10 vCPUs.

B.

Change the Lambda function instance type to use m6a.4xlarge.

C.

Configure the Lambda function to increase the amount of memory.

D.

Configure burstable performance for the Lambda function.

Questions 113

A developer is building two microservices that communicate by using an Amazon SQS queue. The messages exchanged between the microservices contain sensitive information. The developer must ensure that the messages are encrypted at rest.

Which solution will meet these requirements?

Options:
A.

Add a policy to the SQS queue that enforces the aws:SecureTransport condition.

B.

Configure the microservices to enable server-side encryption (SSE) within the message payloads.

C.

Enable server-side encryption (SSE) on the Amazon SQS queue and include the sensitive information in the message body.

D.

Transmit the sensitive information as message attributes instead of the message body.

Questions 114

A company is building a serverless application composed of multiple AWS Lambda functions. The company wants to accelerate feature development without adding staff or reducing quality. The solution must improve unit tests and code reviews, integrate with the existing IDE, and require no new infrastructure.

Which solution will meet these requirements?

Options:
A.

Use AWS CodeBuild with custom scripts for unit tests and Amazon CodeGuru Reviewer for code reviews.

B.

Use Amazon CodeGuru for code reviews and a custom Lambda-based solution for unit tests.

C.

Use AWS CodeBuild for tests and rely on manual pull request reviews.

D.

Use Amazon Q Developer Pro to generate unit tests and perform code reviews directly in the IDE.

Questions 115

A developer wants to use an AWS AppSync API to invoke AWS Lambda functions to return data. Some of the Lambda functions perform long-running processes. The AWS AppSync API needs to return responses immediately.

Which solution will meet these requirements with the LEAST operational overhead?

Options:
A.

Configure the Lambda functions to be AWS AppSync data sources. Use Event mode for asynchronous Lambda invocation.

B.

Increase the timeout setting for the Lambda functions to accommodate longer processing times.

C.

Set up an Amazon SQS queue. Configure AWS AppSync to send messages to the SQS queue. Configure a Lambda function event source mapping to poll the queue.

D.

Enable caching, and increase the duration of the AWS AppSync cache TTL.

Questions 116

A company requires that all applications running on Amazon EC2 use 1AM roles to gam access to AWS services. A developer is modifying an application that currently relies on 1AM user access keys stored in environment variables to access Amazon DynamoDB tables using boto, the AWS SDK for Python.

The developer associated a role with the same permissions as the 1AM user to the EC2 instance, then deleted the 1AM user. When the application was restarted, the AWS

Access Denied Exception messages started appearing in the application logs. The developer was able to use their personal account on the server to run DynamoDB API commands using the AWS CLI.

What is the MOST likely cause of the exception?

Options:
A.

1AM policies might take a few minutes to propagate to resources.

B.

Disabled environment variable credentials are still being used by the application.

C.

The AWS SDK does not support credentials obtained using an instance role.

D.

The instance's security group does not allow access to http://169.254.169.254.

Questions 117

A company is running a custom web application on Amazon EC2 instances behind an Application Load Balancer. The instances run in an Auto Scaling group. The company's development team is using AWS CloudFormation to deploy all the services. The application is time-consuming to install and configure when the development team launches a new instance.

Which combination of steps should a developer take to optimize the performance when a new instance is launched? (Select TWO.)

Options:
A.

Use an AWS Marketplace Amazon Machine Image (AMI) with a prebuilt application.

B.

Create a prebuilt Amazon Machine Image (AMI) with the application installed and configured.

C.

Update the launch template resource in the CloudFormation template.

D.

Use AWS Systems Manager Run Command to install and configure the application.

E.

Use CloudFormation helper scripts to install and configure the application.

Questions 118

An application that is running on Amazon EC2 instances stores data in an Amazon S3 bucket. All the data must be encrypted in transit.

How can a developer ensure that all traffic to the S3 bucket is encrypted?

Options:
A.

Install certificates on the EC2 instances.

B.

Create a private VPC endpoint.

C.

Configure the S3 bucket with server-side encryption with AWS KMS managed encryption keys (SSE-KMS).

D.

Create an S3 bucket policy that denies traffic when the value for the aws:SecureTransport condition key is false.

Questions 119

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?

Options:
A.

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

B.

Deploy the API Gateway REST API to all the receiver AWS accounts. Create as many SCM webhooks as the number of AWS accounts.

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.

D.

Convert the API Gateway type from REST API to HTTP API.

Questions 120

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?

Options:
A.

Rolling

B.

Traffic-splitting

C.

In-place

D.

Immutable