AWS Certified Developer Associate (DVA-C02)

The AWS Certified Developer Associate (DVA-C02) were last updated on today.
  • Viewing page 5 out of 215 pages.
  • Viewing questions 21-25 out of 1,075 questions
Disclaimers:
  • - ExamTopics website is not related to, affiliated with, endorsed or authorized by Amazon.and Azure
  • - Trademarks, certification & product names are used for reference only and belong to Amazon.and Azure

Topic 1 - Exam A

Question #21 Topic 1

A developer has an application that makes batch requests directly to Amazon DynamoDB by using the BatchGetItem low-level API operation. The responses frequently return values in the UnprocessedKeys element. Which actions should the developer take to increase the resiliency of the application when the batch response includes values in UnprocessedKeys? (Choose two.)

  • A Retry the batch operation immediately.
  • B Retry the batch operation with exponential backoff and randomized delay.
  • C Update the application to use an AWS software development kit (AWS SDK) to make the requests.
  • D Increase the provisioned read capacity of the DynamoDB tables that the operation accesses.
  • E Increase the provisioned write capacity of the DynamoDB tables that the operation accesses.
Suggested Answer: BD
NOTE: Answer is :B,D
Explanation :Option B: Exponential backoff and randomized delay is a standard error handling strategy for network applications in which the client occasionally allows for longer delays before retrying. This is a recommended approach to deal with throttling errors from DynamoDB. Option D: If there are frequently UnprocessedKeys, it might point towards the DynamoDB table not having enough provisioned read capacity. Provisioned read capacity determines how many read operations per second your table can support. So, increasing the provisioned read capacity can ensure that all your read operations are processed.
Question #22 Topic 1

A company has hundreds of AWS Lambda functions that the company's QA team needs to test by using the Lambda function URLs. A developer needs to configure the authentication of the Lambda functions to allow access so that the QA IAM group can invoke the Lambda functions by using the public URLs. Which solution will meet these requirements?

  • A Create a CLI script that loops on the Lambda functions to add a Lambda function URL with the AWS_IAM auth type. Run another script to create an IAM identity-based policy that allows the lambda:InvokeFunctionUrl action to all the Lambda function Amazon Resource Names (ARNs). Attach the policy to the QA IAM group.
  • B Create a CLI script that loops on the Lambda functions to add a Lambda function URL with the NONE auth type. Run another script to create an IAM resource-based policy that allows the lambda:InvokeFunctionUrl action to all the Lambda function Amazon Resource Names (ARNs). Attach the policy to the QA IAM group.
  • C Create a CLI script that loops on the Lambda functions to add a Lambda function URL with the AWS_IAM auth type. Run another script to loop on the Lambda functions to create an IAM identity-based policy that allows the lambda:InvokeFunctionUrl action from the QA IAM group's Amazon Resource Name (ARN).
  • D Create a CLI script that loops on the Lambda functions to add a Lambda function URL with the NONE auth type. Run another script to loop on the Lambda functions to create an IAM resource-based policy that allows the lambda:InvokeFunctionUrl action from the QA IAM group's Amazon Resource Name (ARN).
Suggested Answer: A
NOTE: Answer is :A
Explanation :Option A creates an identity-based policy and allows the QA IAM Group to invoke all the Lambda functions. The result would be that all functions could be hit by a public URL and tested accordingly by the QA team. This is achieved by setting the AWS_IAM as the auth type and by allowing the action 'lambda:InvokeFunctionURL' this provides the required access for the QA team to test
Question #23 Topic 1

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?

  • A Create a Lambda environment variable to store the table name. Use the standard method for the programming language to retrieve the variable.
  • B Store 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.
  • C Create 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.
  • D Create a global variable that is outside the handler in the Lambda function to store the table name.
Suggested Answer: A
NOTE: Answer is :A
Explanation :Using Lambda environment variables to store the table name allows the developer to easily change the table name without modifying the Lambda code.
Question #24 Topic 1

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?

  • 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.
  • B Add an override to the feature. Set the identifier of the override to Variation A. Set the variation to 100%.
  • C Add an experiment to the project. Set the identifier of the experiment to Variation B. Set the variation to 0%.
  • D Add an experiment to the project. Set the identifier of the experiment to the AWS account's account ISet the variation to Variation A.
Suggested Answer: A
NOTE: Answer is :A
Explanation :To work exclusively with Variation A, the engineer needs to add an override to the feature. The override is a control tool that forces a specific variant to be presented to a user. By setting the identifier of the override to the engineer's user ID and setting the variation to Variation A, only Varaition A will appear when the engineer accesses the application.
Question #25 Topic 1

A company is running Amazon EC2 instances in multiple AWS accounts. A developer needs to implement an application that collects all the lifecycle events of the EC2 instances. The application needs to store the lifecycle events in a single Amazon Simple Queue Service (Amazon SQS) queue in the company's main AWS account for further processing. Which solution will meet these requirements?

  • A Configure Amazon EC2 to deliver the EC2 instance lifecycle events from all accounts to the Amazon EventBridge event bus of the main account. Add an EventBridge rule to the event bus of the main account that matches all EC2 instance lifecycle events. Add the SQS queue as a target of the rule.
  • B Use the resource policies of the SQS queue in the main account to give each account permissions to write to that SQS queue. Add to the Amazon EventBridge event bus of each account an EventBridge rule that matches all EC2 instance lifecycle events. Add the SQS queue in the main account as a target of the rule.
  • C Write an AWS Lambda function that scans through all EC2 instances in the company accounts to detect EC2 instance lifecycle changes. Configure the Lambda function to write a notification message to the SQS queue in the main account if the function detects an EC2 instance lifecycle change. Add an Amazon EventBridge scheduled rule that invokes the Lambda function every minute.
  • D Configure the permissions on the main account event bus to receive events from all accounts. Create an Amazon EventBridge rule in each account to send all the EC2 instance lifecycle events to the main account event bus. Add an EventBridge rule to the main account event bus that matches all EC2 instance lifecycle events. Set the SQS queue as a target for the rule.
Suggested Answer: A
NOTE: Answer is :A
Explanation :The solution that encompasses the Amazon EC2 lifecycle events, the Amazon EventBridge event bus, and the SQS queue as a target of the rule is option A. This is because it enables the collection of all event information across multiple AWS accounts into one main account. Not only does it match all EC2 instance lifecycle events but it also put them in a single Amazon SQS queue that can be used for further processing.