AWS Certified Developer Associate

AWS Certified Developer Associate practice questions, page 13 of 18, with answer review and explanations.

Question 61

A developer is deploying an application that will store files in an Amazon S3 bucket. The files must be encrypted at rest. The developer wants to automatically replicate the files to an S3 bucket in a different AWS Region for disaster recovery. How can the developer accomplish this task with the LEAST amount of configuration?

  1. Encrypt the files by using server-side encryption with S3 managed encryption keys (SSE-S3). Enable S3 bucket replication.
  2. Encrypt the files by using server-side encryption (SSE) with an AWS Key Management Service (AWS KMS) customer master key (CMK). Enable S3 bucket replication.
  3. Use the s3 sync command to sync the files to the S3 bucket in the other Region.
  4. Configure an S3 Lifecycle configuration to automatically transfer files to the S3 bucket in the other Region.

Question 62

A serverless application is using AWS Step Functions to process data and save it to a database. The application needs to validate some data with an external service before saving the data. The application will call the external service from an AWS Lambda function, and the external service will take a few hours to validate the data. The external service will respond to a webhook when the validation is complete. A developer needs to pause the Step Functions workflow and wait for the response from the external service. What should the developer do to meet this requirement?

  1. Use the .wait ForTaskToken option in the Lambda function task state. Pass the token in the body.
  2. Use the .waitForTaskToken option in the Lambda function task state. Pass the invocation request.
  3. Call the Lambda function in synchronous mode. Wait for the external service to complete the processing.
  4. Call the Lambda function in asynchronous mode. Use the Wait state until the external service completes the processing.

Question 63

A developer must use AWS X-Ray to monitor an application that is running on an Amazon EC2 instance. The developer has prepared the application by using the X-Ray SDK. What should the developer do to perform the monitoring?

  1. Configure the X-Ray SDK sampling rule and target. Activate the X-Ray daemon from the EC2 console or the AWS CLI with the modify-instance-attribute command to set the XRayEnabled flag.
  2. Install the X-Ray daemon. Assign an IAM role to the EC2 instance with a policy that allows writes to X-Ray.
  3. Install the X-Ray daemon. Configure it to forward data to Amazon EventBridge (Amazon CloudWatch Events). Grant the EC2 instance permission to write to Event Bridge (CloudWatch Events).
  4. Deploy the X-Ray SDK with the application, and instrument the application code. Use the SDK logger to capture and send the events.

Question 64

A developer is designing a full-stack serverless application. Files for the website are stored in an Amazon S3 bucket. AWS Lambda functions that use Amazon API Gateway endpoints return results from an Amazon DynamoDB table. The developer must create a solution that securely provides registration and authentication for the application while minimizing the amount of configuration. Which solution meets these requirements?

  1. Create an Amazon Cognito user pool and an app client. Configure the app client to use the user pool and provide the hosted web UI provided for sign-up and sign-in.
  2. Configure an Amazon Cognito identity pool. Map the users with IAM roles that are configured to access the S3 bucket that stores the website.
  3. Configure and launch an Amazon EC2 instance to set up an identity provider with an Amazon Cognito user pool. Configure the user pool to provide the hosted web UI for sign-up and sign-in.
  4. Create an IAM policy that allows access to the website that is stored in the S3 bucket. Attach the policy to an IAM group. Add IAM users to the group.

Question 65

A company has an application that writes files to an Amazon S3 bucket. Whenever there is a new file, an S3 notification event invokes an AWS Lambda function to process the file. The Lambda function code works as expected. However, when a developer checks the Lambda function logs, the developer finds that multiple invocations occur for every file. What is causing the duplicate entries?

  1. The S3 bucket name is incorrectly specified in the application and is targeting another S3 bucket.
  2. The Lambda function did not run correctly, and Lambda retried the invocation with a delay.
  3. Amazon S3 is delivering the same event multiple times.
  4. The application stopped intermittently and then resumed, splitting the logs into multiple smaller files.