AWS Certified Developer Associate (DVA-C02)

The AWS Certified Developer Associate (DVA-C02) were last updated on today.
  • Viewing page 8 out of 215 pages.
  • Viewing questions 36-40 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 #36 Topic 1

A real-time messaging application uses Amazon API Gateway WebSocket APIs with backend HTTP service. A developer needs to build a feature in the application to identify a client that keeps connecting to and disconnecting from the WebSocket connection. The developer also needs the ability to remove the client. Which combination of changes should the developer make to the application to meet these requirements? (Choose two.)

  • A Switch to HTTP APIs in the backend service.
  • B Switch to REST APIs in the backend service.
  • C Use the callback URL to disconnect the client from the backend service.
  • D Add code to track the client status in Amazon ElastiCache in the backend service.
  • E Implement $connect and $disconnect routes in the backend service.
Suggested Answer: CE
NOTE: Answer is :C and E
Explanation :Option C and E are necessary to meet the requirements as described in the question. C is correct because using the callback URL to disconnect the client from the backend service will give the developer the ability to remove the client. E is correct because implementing $connect and $disconnect routes in the backend service will allow the developer to identify a client that constantly connects and disconnects.
Question #37 Topic 1

A company has an image storage web application that runs on AWS. The company hosts the application on Amazon EC2 instances in an Auto Scaling group. The Auto Scaling group acts as the target group for an Application Load Balancer (ALB) and uses an Amazon S3 bucket to store the images for sale. The company wants to develop a feature to test system requests. The feature will direct requests to a separate target group that hosts a new beta version of the application. Which solution will meet this requirement with the LEAST effort?

  • A Create a new Auto Scaling group and target group for the beta version of the application. Update the ALB routing rule with a condition that looks for a cookie named version that has a value of beta. Update the test system code to use this cookie to test the beta version of the application.
  • B Create a new ALB, Auto Scaling group, and target group for the beta version of the application. Configure an alternate Amazon Route 53 record for the new ALB endpoint. Use the alternate Route 53 endpoint in the test system requests to test the beta version of the application.
  • C Create a new ALB, Auto Scaling group, and target group for the beta version of the application. Use Amazon CloudFront with [email protected] to determine which specific request will go to the new ALB. Use the CloudFront endpoint to send the test system requests to test the beta version of the application.
  • D Create a new Auto Scaling group and target group for the beta version of the application. Update the ALB routing rule with a condition that looks for a cookie named version that has a value of beta. Use Amazon CloudFront with [email protected] to update the test system requests to add the required cookie when the requests go to the ALB.
Suggested Answer: A
NOTE: Answer is :A
Explanation :The proposed solution A provides a seamless way of achieving the requirements with the least effort. Creating a routing rule that looks for a specific cookie to route requests makes the test system for beta version easier. Instead of creating a new ALB, simply update the existing one with the routing instructions, which is less work.
Question #38 Topic 1

A developer is updating several AWS Lambda functions and notices that all the Lambda functions share the same custom libraries. The developer wants to centralize all the libraries, update the libraries in a convenient way, and keep the libraries versioned. Which solution will meet these requirements with the LEAST development effort?

  • A Create an AWS CodeArtifact repository that contains all the custom libraries.
  • B Create a custom container image for the Lambda functions to save all the custom libraries.
  • C Create a Lambda layer that contains all the custom libraries.
  • D Create an Amazon Elastic File System (Amazon EFS) file system to store all the custom libraries.
Suggested Answer: C
NOTE: Answer is :C
Explanation :A lambda layer is a distribution mechanism for libraries, custom runtimes, and other function dependencies. By using lambda layers, we can manage shared code and resources efficiently.
Question #39 Topic 1

A company is implementing an application on Amazon EC2 instances. The application needs to process incoming transactions. When the application detects a transaction that is not valid, the application must send a chat message to the company's support team. To send the message, the application needs to retrieve the access token to authenticate by using the chat API. A developer needs to implement a solution to store the access token. The access token must be encrypted at rest and in transit. The access token must also be accessible from other AWS accounts. Which solution will meet these requirements with the LEAST management overhead?

  • A Use an AWS Systems Manager Parameter Store SecureString parameter that uses an AWS Key Management Service (AWS KMS) AWS managed key to store the access token. Add a resource-based policy to the parameter to allow access from other accounts. Update the IAM role of the EC2 instances with permissions to access Parameter Store. Retrieve the token from Parameter Store with the decrypt flag enabled. Use the decrypted access token to send the message to the chat.
  • B Encrypt the access token by using an AWS Key Management Service (AWS KMS) customer managed key. Store the access token in an Amazon DynamoDB table. Update the IAM role of the EC2 instances with permissions to access DynamoDB and AWS KMS. Retrieve the token from DynamoDDecrypt the token by using AWS KMS on the EC2 instances. Use the decrypted access token to send the message to the chat.
  • C Use AWS Secrets Manager with an AWS Key Management Service (AWS KMS) customer managed key to store the access token. Add a resource-based policy to the secret to allow access from other accounts. Update the IAM role of the EC2 instances with permissions to access Secrets Manager. Retrieve the token from Secrets Manager. Use the decrypted access token to send the message to the chat.
  • D Encrypt the access token by using an AWS Key Management Service (AWS KMS) AWS managed key. Store the access token in an Amazon S3 bucket. Add a bucket policy to the S3 bucket to allow access from other accounts. Update the IAM role of the EC2 instances with permissions to access Amazon S3 and AWS KMS. Retrieve the token from the S3 bucket. Decrypt the token by using AWS KMS on the EC2 instances. Use the decrypted access token to send the massage to the chat.
Suggested Answer: A
NOTE: Answer is :A
Explanation :AWS Systems Manager Parameter Store provides secure, hierarchical storage for configuration data management and secrets management. It keeps data encrypted at rest and in transit. By using AWS KMS to create a SecureString parameter, the data is also encrypted. Furthermore, a resource-based policy can be added to allow access from other AWS account with the least management overhead.
Question #40 Topic 1

A developer is creating an application that will give users the ability to store photos from their cellphones in the cloud. The application needs to support tens of thousands of users. The application uses an Amazon API Gateway REST API that is integrated with AWS Lambda functions to process the photos. The application stores details about the photos in Amazon DynamoDB. Users need to create an account to access the application. In the application, users must be able to upload photos and retrieve previously uploaded photos. The photos will range in size from 300 KB to 5 MB. Which solution will meet these requirements with the LEAST operational overhead?

  • A Use Amazon Cognito user pools to manage user accounts. Create an Amazon Cognito user pool authorizer in API Gateway to control access to the API. Use the Lambda function to store the photos and details in the DynamoDB table. Retrieve previously uploaded photos directly from the DynamoDB table.
  • B Use Amazon Cognito user pools to manage user accounts. Create an Amazon Cognito user pool authorizer in API Gateway to control access to the API. Use the Lambda function to store the photos in Amazon S3. Store the object's S3 key as part of the photo details in the DynamoDB table. Retrieve previously uploaded photos by querying DynamoDB for the S3 key.
  • C Create an IAM user for each user of the application during the sign-up process. Use IAM authentication to access the API Gateway API. Use the Lambda function to store the photos in Amazon S3. Store the object's S3 key as part of the photo details in the DynamoDB table. Retrieve previously uploaded photos by querying DynamoDB for the S3 key.
  • D Create a users table in DynamoDB. Use the table to manage user accounts. Create a Lambda authorizer that validates user credentials against the users table. Integrate the Lambda authorizer with API Gateway to control access to the API. Use the Lambda function to store the photos in Amazon S3. Store the object's S3 key as par of the photo details in the DynamoDB table. Retrieve previously uploaded photos by querying DynamoDB for the S3 key.
Suggested Answer: B
NOTE: Answer is :B
Explanation :Option B is the most suitable solution as it uses Amazon Cognito for user management and authorization, which reduces operational overhead compared to creating and managing IAM users or DynamoDB tables for each user. It also makes use of S3 for storing photos which is more suitable for holding larger binary data such as photos, compared to storing in DynamoDB directly. The usage of S3 keys in DynamoDB for retrieving photos is also an efficient approach in this scenario.