AWS Certified Developer Associate (DVA-C02)

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

A company is building a serverless application that uses AWS Lambda functions. The company needs to create a set of test events to test Lambda functions in a development environment. The test events will be created once and then will be used by all the developers in an IAM developer group. The test events must be editable by any of the IAM users in the IAM developer group. Which solution will meet these requirements?

  • A Create and store the test events in Amazon S3 as JSON objects. Allow S3 bucket access to all IAM users.
  • B Create the test events. Configure the event sharing settings to make the test events shareable.
  • C Create and store the test events in Amazon DynamoDB. Allow access to DynamoDB by using IAM roles.
  • D Create the test events. Configure the event sharing settings to make the test events private.
Suggested Answer: A
NOTE: Answer is :A
Explanation :Amazon S3 allows storing JSON objects which can be the test events. Also, S3 allows bucket access configuration, enabling all IAM users to access, edit and use the test events. This way, flexible access management can be achieved.
Question #17 Topic 1

A developer is creating a service that uses an Amazon S3 bucket for image uploads. The service will use an AWS Lambda function to create a thumbnail of each image. Each time an image is uploaded, the service needs to send an email notification and create the thumbnail. The developer needs to configure the image processing and email notifications setup. Which solution will meet these requirements?

  • A Create an Amazon Simple Notification Service (Amazon SNS) topic. Configure S3 event notifications with a destination of the SNS topic. Subscribe the Lambda function to the SNS topic. Create an email notification subscription to the SNS topic.
  • B Create an Amazon Simple Notification Service (Amazon SNS) topic. Configure S3 event notifications with a destination of the SNS topic. Subscribe the Lambda function to the SNS topic. Create an Amazon Simple Queue Service (Amazon SQS) queue. Subscribe the SQS queue to the SNS topic. Create an email notification subscription to the SQS queue.
  • C Create an Amazon Simple Queue Service (Amazon SQS) queue. Configure S3 event notifications with a destination of the SQS queue. Subscribe the Lambda function to the SQS queue. Create an email notification subscription to the SQS queue.
  • D Create an Amazon Simple Queue Service (Amazon SQS) queue. Send S3 event notifications to Amazon EventBridge. Create an EventBridge rule that runs the Lambda function when images are uploaded to the S3 bucket. Create an EventBridge rule that sends notifications to the SQS queue. Create an email notification subscription to the SQS queue.
Suggested Answer: A
NOTE: Answer is :A
Explanation :Option A will ensure that every time an image is uploaded to the S3 bucket, an email and a thumbnail creation notification will be created and delivered. This is because S3 event notifications can be set up to send messages to the SNS topic. The Lambda function, which is subscribed to the SNS topic, will then create the thumbnail. An email notification subscription to the SNS topic will send an email each time an image is uploaded.
Question #18 Topic 1

A company must deploy all its Amazon RDS DB instances by using AWS CloudFormation templates as part of AWS CodePipeline continuous integration and continuous delivery (CI/CD) automation. The primary password for the DB instance must be automatically generated as part of the deployment process. Which solution will meet these requirements with the LEAST development effort?

  • A Create an AWS Lambda-backed CloudFormation custom resource. Write Lambda code that generates a secure string. Return the value of the secure string as a data field of the custom resource response object. Use the CloudFormation Fn::GetAtt intrinsic function to get the value of the secure string. Use the value to create the DB instance.
  • B Use the AWS CodeBuild action of CodePipeline to generate a secure string by using the following AWS CLI command: aws secretsmanager get-random-password. Pass the generated secure string as a CloudFormation parameter with the NoEcho attribute set to true. Use the parameter reference to create the DB instance.
  • C Create an AWS Lambda-backed CloudFormation custom resource. Write Lambda code that generates a secure string. Return the value of the secure string as a data field of the custom resource response object. Use the CloudFormation Fn::GetAtt intrinsic function to get a value of the secure string. Create secrets in AWS Secrets Manager. Use the secretsmanager dynamic reference to use the value stored in the secret to create the DB instance.
  • D Use the AWS::SecretsManager::Secret resource to generate a secure string. Store the secure string as a secret in AWS Secrets Manager. Use the secretsmanager dynamic reference to use the value stored in the secret to create the DB instance.
Suggested Answer: A
NOTE: Answer is :A
Explanation :Option A requires the least development effort as it does not require the creation of additional resources or steps outside AWS CloudFormation. Using AWS Lambda-backed CloudFormation custom resource enables automatic generation of a secure string which is then returned as a data field of the custom resource response object. The Fn::GetAtt intrinsic function is used to create the DB instance with the value of the secure string.
Question #19 Topic 1

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

  • 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.
Suggested Answer: BC
NOTE: Answer is :B, C
Explanation :Option B will ensure the most recent version of the application is installed and the required patches are applied. Option C is using CodeDeploy which will ensure the latest version of the application is run at runtime.
Question #20 Topic 1

A developer is developing an application that uses signed requests (Signature Version 4) to call other AWS services. The developer has created a canonical request, has created the string to sign, and has calculated signing information. Which methods could the developer use to complete a signed request? (Choose two.)

  • A Add the signature to an HTTP header that is named Authorization.
  • B Add the signature to a session cookie.
  • C Add the signature to an HTTP header that is named Authentication.
  • D Add the signature to a query string parameter that is named X-Amz-Signature.
  • E Add the signature to an HTTP header that is named WWW-Authenticate.
Suggested Answer: AD
NOTE: Answer is :A,D
Explanation :In Amazon AWS Signature Version 4, you can add the signature to an HTTP header named Authorization. Also, you can add the signature to the query string parameter named X-Amz-Signature in the URL of your request.