🔍

DVA-C02 — questions

Page 12 of 28 · 557 total questions.

Topic 1 · Question 221

An application needs to use the IP address of the client in its processing. The application has been moved into AWS and has been placed behind an Application Load Balancer (ALB). However, all the client IP addresses now appear to be the same. The application must maintain the ability to scale horizontally. Based on this scenario, what is the MOST cost-effective solution to this problem?

  • ARemove the application from the ALB. Delete the ALB and change Amazon Route 53 to direct traffic to the instance running the application.
  • BRemove the application from the ALCreate a Classic Load Balancer in its place. Direct traffic to the application using the HTTP protocol.
  • CAlter the application code to inspect the X-Forwarded-For header. Ensure that the code can work properly if a list of IP addresses is passed in the header. (correct answer)
  • DAlter the application code to inspect a custom header. Alter the client code to pass the IP address in the custom header.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Alter the application code to inspect the X-Forwarded-For header. Ensure that the code can work properly if a list of IP addresses is passed in the header. This option delivers the requirement at the lowest cost.

Topic 1 · Question 222

A developer is designing a serverless application that customers use to select seats for a concert venue. Customers send the ticket requests to an Amazon API Gateway API with an AWS Lambda function that acknowledges the order and generates an order ID. The application includes two additional Lambda functions: one for inventory management and one for payment processing. These two Lambda functions run in parallel and write the order to an Amazon Dynamo DB table. The application must provide seats to customers according to the following requirements. If a seat is accidently sold more than once, the first order that the application received must get the seat. In these cases, the application must process the payment for only the first order. However, if the first order is rejected during payment processing, the second order must get the seat. In these cases, the application must process the payment for the second order. Which solution will meet these requirements?

  • ASend the order ID to an Amazon Simple Notification Service (Amazon SNS) FIFO topic that fans out to one Amazon Simple Queue Service (Amazon SQS) FIFO queue for inventory management and another SQS FIFO queue for payment processing. (correct answer)
  • BChange the Lambda function that generates the order ID to initiate the Lambda function for inventory management. Then initiate the Lambda function for payment processing.
  • CSend the order ID to an Amazon Simple Notification Service (Amazon SNS) topic. Subscribe the Lambda functions for inventory management and payment processing to the topic.
  • DDeliver the order ID to an Amazon Simple Queue Service (Amazon SQS) queue. Configure the Lambda functions for inventory management and payment processing to poll the queue.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Send the order ID to an Amazon Simple Notification Service (Amazon SNS) FIFO topic that fans out to one Amazon Simple Queue Service (Amazon SQS) FIFO queue for inventory management and another SQS FIFO queue for payme...

Explanation

Amazon SQS is a fully managed message queue that decouples components and absorbs traffic spikes. Amazon SNS is a managed pub/sub service for fan-out notifications to many subscribers.

Topic 1 · Question 223

An application uses AWS X-Ray to generate a large amount of trace data on an hourly basis. A developer wants to use filter expressions to limit the returned results through user-specified custom attributes. How should the developer use filter expressions to filter the results in X-Ray?

  • AAdd custom attributes as annotations in the segment document. (correct answer)
  • BAdd custom attributes as metadata in the segment document.
  • CAdd custom attributes as new segment fields in the segment document.
  • DCreate new sampling rules that are based on custom attributes.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Add custom attributes as annotations in the segment document.

Topic 1 · Question 224

A web application is using Amazon Kinesis Data Streams for clickstream data that may not be consumed for up to 12 hours. How can the developer implement encryption at rest for data within the Kinesis Data Streams?

  • AEnable SSL connections to Kinesis.
  • BUse Amazon Kinesis Consumer Library.
  • CEncrypt the data once it is at rest with a Lambda function.
  • DEnable server-side encryption in Kinesis Data Streams. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Enable server-side encryption in Kinesis Data Streams.

Explanation

Kinesis Data Streams ingests and processes high-volume real-time streaming data. Amazon Kinesis ingests and processes real-time streaming data at scale.

Topic 1 · Question 225

An application is real-time processing millions of events that are received through an API. What service could be used to allow multiple consumers to process the data concurrently and MOST cost-effectively?

  • AAmazon SNS with fanout to an SQS queue for each application
  • BAmazon SNS with fanout to an SQS FIFO (first-in, first-out) queue for each application
  • CAmazon Kinesis Firehose
  • DAmazon Kinesis Data Streams (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Amazon Kinesis Data Streams

Explanation

Kinesis Data Streams ingests and processes high-volume real-time streaming data. Amazon Kinesis ingests and processes real-time streaming data at scale. This option delivers the requirement at the lowest cost.

Topic 1 · Question 226

Given the following AWS CloudFormation template: What is the MOST efficient way to reference the new Amazon S3 bucket from another AWS CloudFormation template?

Exhibit 1 for question 226
  • AAdd an Export declaration to the Outputs section of the original template and use ImportValue in other templates. (correct answer)
  • BAdd Exported: true to the Content.Bucket in the original template and use ImportResource in other templates.
  • CCreate a custom AWS CloudFormation resource that gets the bucket name from the ContentBucket resource of the first stack.
  • DUse Fn::Include to include the existing template in other templates and use the ContentBucket resource directly.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Add an Export declaration to the Outputs section of the original template and use ImportValue in other templates.

Topic 1 · Question 227 · Select all that apply

A developer has built an application that inserts data into an Amazon DynamoDB table. The table is configured to use provisioned capacity. The application is deployed on a burstable nano Amazon EC2 instance. The application logs show that the application has been failing because of a ProvisionedThroughputExceededException error. Which actions should the developer take to resolve this issue? (Choose two.)

  • AMove the application to a larger EC2 instance.
  • BIncrease the number of read capacity units (RCUs) that are provisioned for the DynamoDB table.
  • CReduce the frequency of requests to DynamoDB by implementing exponential backoff. (correct answer)
  • DIncrease the frequency of requests to DynamoDB by decreasing the retry delay.
  • EChange the capacity mode of the DynamoDB table from provisioned to on-demand. (correct answer)
Reveal answer & explanation
Correct answer: C, E

The correct answer is C, E. Option C: Reduce the frequency of requests to DynamoDB by implementing exponential backoff. Option E: Change the capacity mode of the DynamoDB table from provisioned to on-demand.

Explanation

Amazon DynamoDB is a fully managed, serverless NoSQL database with single-digit millisecond latency and automatic scaling.

Topic 1 · Question 228

A company is hosting a workshop for external users and wants to share the reference documents with the external users for 7 days. The company stores the reference documents in an Amazon S3 bucket that the company owns. What is the MOST secure way to share the documents with the external users?

  • AUse S3 presigned URLs to share the documents with the external users. Set an expiration time of 7 days. (correct answer)
  • BMove the documents to an Amazon WorkDocs folder. Share the links of the WorkDocs folder with the external users.
  • CCreate temporary IAM users that have read-only access to the S3 bucket. Share the access keys with the external users. Expire the credentials after 7 days.
  • DCreate a role that has read-only access to the S3 bucket. Share the Amazon Resource Name (ARN) of this role with the external users.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Use S3 presigned URLs to share the documents with the external users. Set an expiration time of 7 days.

Explanation

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

Topic 1 · Question 229

A developer is planning to use an Amazon API Gateway and AWS Lambda to provide a REST API. The developer will have three distinct environments to manage: development, test, and production. How should the application be deployed while minimizing the number of resources to manage?

  • ACreate a separate API Gateway and separate Lambda function for each environment in the same Region.
  • BAssign a Region for each environment and deploy API Gateway and Lambda to each Region.
  • CCreate one API Gateway with multiple stages with one Lambda function with multiple aliases. (correct answer)
  • DCreate one API Gateway and one Lambda function, and use a REST parameter to identify the environment.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Create one API Gateway with multiple stages with one Lambda function with multiple aliases.

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 230

A developer registered an AWS Lambda function as a target for an Application Load Balancer (ALB) using a CLI command. However, the Lambda function is not being invoked when the client sends requests through the ALB. Why is the Lambda function not being invoked?

  • AA Lambda function cannot be registered as a target for an ALB.
  • BA Lambda function can be registered with an ALB using AWS Management Console only.
  • CThe permissions to invoke the Lambda function are missing. (correct answer)
  • DCross-zone is not enabled on the ALB.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: The permissions to invoke the Lambda function are missing.

Explanation

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

Topic 1 · Question 231

A developer is creating an AWS Lambda function that will connect to an Amazon RDS for MySQL instance. The developer wants to store the database credentials. The database credentials need to be encrypted and the database password needs to be automatically rotated. Which solution will meet these requirements?

  • AStore the database credentials as environment variables for the Lambda function. Set the environment variables to rotate automatically.
  • BStore the database credentials in AWS Secrets Manager. Set up managed rotation on the database credentials. (correct answer)
  • CStore the database credentials in AWS Systems Manager Parameter Store as secure string parameters. Set up managed rotation on the parameters.
  • DStore the database credentials in the X-Amz-Security-Token parameter. Set up managed rotation on the parameter.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Store the database credentials in AWS Secrets Manager. Set up managed rotation on the database credentials.

Explanation

AWS Secrets Manager stores and automatically rotates secrets such as database credentials.

Topic 1 · Question 232

A developer wants to reduce risk when deploying a new version of an existing AWS Lambda function. To test the Lambda function, the developer needs to split the traffic between the existing version and the new version of the Lambda function. Which solution will meet these requirements?

  • AConfigure a weighted routing policy in Amazon Route 53. Associate the versions of the Lambda function with the weighted routing policy.
  • BCreate a function alias. Configure the alias to split the traffic between the two versions of the Lambda function. (correct answer)
  • CCreate an Application Load Balancer (ALB) that uses the Lambda function as a target. Configure the ALB to split the traffic between the two versions of the Lambda function.
  • DCreate the new version of the Lambda function as a Lambda layer on the existing version. Configure the function to split the traffic between the two layers.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Create a function alias. Configure the alias to split the traffic between the two versions of the Lambda function.

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 233 · Select all that apply

A developer has created a large AWS Lambda function. Deployment of the function is failing because of an InvalidParameterValueException error. The error message indicates that the unzipped size of the function exceeds the maximum supported value. Which actions can the developer take to resolve this error? (Choose two.)

  • ASubmit a quota increase request to AWS Support to increase the function to the required size.
  • BUse a compression algorithm that is more efficient than ZIP.
  • CBreak up the function into multiple smaller functions. (correct answer)
  • DZip the .zip file twice to compress the file more.
  • EMove common libraries, function dependencies, and custom runtimes into Lambda layers. (correct answer)
Reveal answer & explanation
Correct answer: C, E

The correct answer is C, E. Option C: Break up the function into multiple smaller functions. Option E: Move common libraries, function dependencies, and custom runtimes into Lambda layers.

Explanation

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

Topic 1 · Question 234

A developer is troubleshooting an application in an integration environment. In the application, an Amazon Simple Queue Service (Amazon SQS) queue consumes messages and then an AWS Lambda function processes the messages. The Lambda function transforms the messages and makes an API call to a third-party service. There has been an increase in application usage. The third-party API frequently returns an HTTP 429 Too Many Requests error message. The error message prevents a significant number of messages from being processed successfully. How can the developer resolve this issue?

  • AIncrease the SQS event source’s batch size setting.
  • BConfigure provisioned concurrency for the Lambda function based on the third-party API’s documented rate limits.
  • CIncrease the retry attempts and maximum event age in the Lambda function’s asynchronous configuration.
  • DConfigure maximum concurrency on the SQS event source based on the third-party service’s documented rate limits. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Configure maximum concurrency on the SQS event source based on the third-party service’s documented rate limits.

Explanation

Amazon SQS is a fully managed message queue that decouples components and absorbs traffic spikes. AWS Config tracks resource configuration changes and evaluates compliance.

Topic 1 · Question 235

A company has a three-tier application that is deployed in Amazon Elastic Container Service (Amazon ECS). The application is using an Amazon RDS for MySQL DB instance. The application performs more database reads than writes. During times of peak usage, the application’s performance degrades. When this performance degradation occurs, the DB instance’s ReadLatency metric in Amazon CloudWatch increases suddenly. How should a developer modify the application to improve performance?

  • AUse Amazon ElastiCache to cache query results. (correct answer)
  • BScale the ECS cluster to contain more ECS instances.
  • CAdd read capacity units (RCUs) to the DB instance.
  • DModify the ECS task definition to increase the task memory.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Use Amazon ElastiCache to cache query results.

Explanation

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

Topic 1 · Question 236

A company has an online web application that includes a product catalog. The catalog is stored in an Amazon S3 bucket that is named DOC-EXAMPLE-BUCKET. The application must be able to list the objects in the S3 bucket and must be able to download objects through an IAM policy.

Which policy allows MINIMUM access to meet these requirements?

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

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

Topic 1 · Question 237

A developer is writing an application to encrypt files outside of AWS before uploading the files to an Amazon S3 bucket. The encryption must be symmetric and must be performed inside the application. How can the developer implement the encryption in the application to meet these requirements?

  • ACreate a data key in AWS Key Management Service (AWS KMS). Use the AWS Encryption SDK to encrypt the files. (correct answer)
  • BCreate a Hash-Based Message Authentication Code (HMAC) key in AWS Key Management Service (AWS KMS). Use the AWS Encryption SDK to encrypt the files.
  • CCreate a data key pair in AWS Key Management Service (AWS KMS). Use the AWS CLI to encrypt the files.
  • DCreate a data key in AWS Key Management Service (AWS KMS). Use the AWS CLI to encrypt the files.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Create a data key in AWS Key Management Service (AWS KMS). Use the AWS Encryption SDK to encrypt the files.

Explanation

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

Topic 1 · Question 238

A developer is working on an application that is deployed on an Amazon EC2 instance. The developer needs a solution that will securely transfer files from the application to an Amazon S3 bucket. What should the developer do to meet these requirements in the MOST secure way?

  • ACreate an IAM user. Create an access key for the IAM user. Store the access key in the application’s environment variables.
  • BCreate an IAM role. Create an access key for the IAM role. Store the access key in the application’s environment variables.
  • CCreate an IAM role. Configure the IAM role to access the specific Amazon S3 API calls the application requires. Associate the IAM role with the EC2 instance. (correct answer)
  • DConfigure an S3 bucket policy for the S3 bucket. Configure the S3 bucket policy to allow access for the EC2 instance ID.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Create an IAM role. Configure the IAM role to access the specific Amazon S3 API calls the application requires. Associate the IAM role with the EC2 instance.

Explanation

Amazon EC2 provides resizable virtual servers when you need full control of the operating system. Amazon S3 provides durable, scalable object storage that is fully managed. An IAM role grants temporary, least-privilege permissions to AWS resources without long-term credentials.

Topic 1 · Question 239

A developer created a web API that receives requests by using an internet-facing Application Load Balancer (ALB) with an HTTPS listener. The developer configures an Amazon Cognito user pool and wants to ensure that every request to the API is authenticated through Amazon Cognito. What should the developer do to meet this requirement?

  • AAdd a listener rule to the listener to return a fixed response if the Authorization header is missing. Set the fixed response to 401 Unauthorized.
  • BCreate an authentication action for the listener rules of the ALSet the rule action type to authenticate-cognito. Set the OnUnauthenticatedRequest field to “deny.” (correct answer)
  • CCreate an Amazon API Gateway API. Configure all API methods to be forwarded to the ALB endpoint. Create an authorizer of the COGNITO_USER_POOLS type. Configure every API method to use that authorizer.
  • DCreate a new target group that includes an AWS Lambda function target that validates the Authorization header by using Amazon Cognito. Associate the target group with the listener.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Create an authentication action for the listener rules of the ALSet the rule action type to authenticate-cognito. Set the OnUnauthenticatedRequest field to “deny.”

Explanation

Amazon Cognito manages user sign-up, sign-in and federated identity for applications.

Topic 1 · Question 240 · Select all that apply

A company recently deployed an AWS Lambda function. A developer notices an increase in the function throttle metrics in Amazon CloudWatch. What are the MOST operationally efficient solutions to reduce the function throttling? (Choose two.)

  • AMigrate the function to Amazon Elastic Kubernetes Service (Amazon EKS).
  • BIncrease the maximum age of events in Lambda.
  • CIncrease the function’s reserved concurrency. (correct answer)
  • DAdd the lambda:GetFunctionConcurrency action to the execution role.
  • ERequest a service quota change for increased concurrency. (correct answer)
Reveal answer & explanation
Correct answer: C, E

The correct answer is C, E. Option C: Increase the function’s reserved concurrency. Option E: Request a service quota change for increased concurrency.

Showing questions 221240 of 557 · Page 12 of 28