AWS Certified Developer Associate (DVA-C02)

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

A company wants to deploy and maintain static websites on AWS. Each website's source code is hosted in one of several version control systems, including AWS CodeCommit, Bitbucket, and GitHub. The company wants to implement phased releases by using development, staging, user acceptance testing, and production environments in the AWS Cloud. Deployments to each environment must be started by code merges on the relevant Git branch. The company wants to use HTTPS for all data exchange. The company needs a solution that does not require servers to run continuously. Which solution will meet these requirements with the LEAST operational overhead?

  • A Host each website by using AWS Amplify with a serverless backend. Conned the repository branches that correspond to each of the desired environments. Start deployments by merging code changes to a desired branch.
  • B Host each website in AWS Elastic Beanstalk with multiple environments. Use the EB CLI to link each repository branch. Integrate AWS CodePipeline to automate deployments from version control code merges.
  • C Host each website in different Amazon S3 buckets for each environment. Configure AWS CodePipeline to pull source code from version control. Add an AWS CodeBuild stage to copy source code to Amazon S3.
  • D Host each website on its own Amazon EC2 instance. Write a custom deployment script to bundle each website's static assets. Copy the assets to Amazon EC2. Set up a workflow to run the script when code is merged.
Suggested Answer: A
NOTE: Answer is :A
Explanation :AWS Amplify with a serverless backend would eliminate the need for servers to run continuously, reducing operational overhead. It would also allow for phased releases through different environment setups, cause deployments based on code merging, and support HTTPS for data exchange.
Question #47 Topic 1

A developer is creating an application. New users of the application must be able to create an account and register by using their own social media accounts. Which AWS service or resource should the developer use to meet these requirements?

  • A IAM role
  • B Amazon Cognito identity pools
  • C Amazon Cognito user pools
  • D AWS Directory Service
Suggested Answer: C
NOTE: Answer is :C
Explanation :Amazon Cognito user pools provide sign-in and sign-up options for application users, including integration with social sign-in providers like Facebook, Google, etc.
Question #48 Topic 1

A company has a front-end application that runs on four Amazon EC2 instances behind an Elastic Load Balancer (ELB) in a production environment that is provisioned by AWS Elastic Beanstalk. A developer needs to deploy and test new application code while updating the Elastic Beanstalk platform from the current version to a newer version of Node.js. The solution must result in zero downtime for the application. Which solution meets these requirements?

  • A Clone the production environment to a different platform version. Deploy the new application code, and test it. Swap the environment URLs upon verification.
  • B Deploy the new application code in an all-at-once deployment to the existing EC2 instances. Test the code. Redeploy the previous code if verification fails.
  • C Perform an immutable update to deploy the new application code to new EC2 instances. Serve traffic to the new instances after they pass health checks.
  • D Use a rolling deployment for the new application code. Apply the code to a subset of EC2 instances until the tests pass. Redeploy the previous code if the tests fail.
Suggested Answer: A
NOTE: Answer is :A
Explanation :Option A ensures a new platform version and new application code can be tested without impacting the current production application. Using environment URL swapping can reduce the risk of downtime.
Question #49 Topic 1

A company is updating an application to move the backend of the application from Amazon EC2 instances to a serverless model. The application uses an Amazon RDS for MySQL DB instance and runs in a single VPC on AWS. The application and the DB instance are deployed in a private subnet in the VPC. The company needs to connect AWS Lambda functions to the DB instance. Which solution will meet these requirements?

  • A Create Lambda functions inside the VPC with the AWSLambdaBasicExecutionRole policy attached to the Lambda execution role. Modify the RDS security group to allow inbound access from the Lambda security group.
  • B Create Lambda functions inside the VPC with the AWSLambdaVPCAccessExecutionRole policy attached to the Lambda execution role. Modify the RDS security group to allow inbound access from the Lambda security group.
  • C Create Lambda functions with the AWSLambdaBasicExecutionRole policy attached to the Lambda execution role. Create an interface VPC endpoint for the Lambda functions. Configure the interface endpoint policy to allow the lambda:InvokeFunclion action for each Lambda function's Amazon Resource Name (ARN).
  • D Create Lambda functions with the AWSLambdaVPCAccessExecutionRole policy attached to the Lambda execution role. Create an interface VPC endpoint for the Lambda functions. Configure the interface endpoint policy to allow the lambda:InvokeFunction action for each Lambda function's Amazon Resource Name (ARN).
Suggested Answer: B
NOTE: Answer is :B
Explanation :Solution B is the proper way to go. We're moving to serverless so the Lambda function will connect to VPC for RDS MySQL. The AWSLambdaVPCAccessExecutionRole policy allows the function to connect to VPC resources and also write logs to CloudWatch.
Question #50 Topic 1

A company receives food orders from multiple partners. The company has a microservices application that uses Amazon API Gateway APIs with AWS Lambda integration. Each partner sends orders by calling a customized API that is exposed through API Gateway. The API call invokes a shared Lambda function to process the orders. Partners need to be notified after the Lambda function processes the orders. Each partner must receive updates for only the partner's own orders. The company wants to add new partners in the future with the fewest code changes possible. Which solution will meet these requirements in the MOST scalable way?

  • A Create a different Amazon Simple Notification Service (Amazon SNS) topic for each partner. Configure the Lambda function to publish messages for each partner to the partner's SNS topic.
  • B Create a different Lambda function for each partner. Configure the Lambda function to notify each partner's service endpoint directly.
  • C Create an Amazon Simple Notification Service (Amazon SNS) topic. Configure the Lambda function to publish messages with specific attributes to the SNS topic. Subscribe each partner to the SNS topic. Apply the appropriate filter policy to the topic subscriptions.
  • D Create one Amazon Simple Notification Service (Amazon SNS) topic. Subscribe all partners to the SNS topic.
Suggested Answer: C
NOTE: Answer is :C
Explanation :Option C meets the requirements in the most scalable way. One Amazon SNS topic can be created and the Lambda function can be configured to publish messages with specific attributes to the SNS topic. Each partner can then subscribe to the SNS topic and the appropriate filter policy can be applied to their subscriptions. This way, partners will receive updates only for their own orders without requiring a unique Lambda function or SNS topic for each partner, making the system more scalable and easier to manage with fewer code changes when adding new partners.