AWS Certified Developer Associate

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

Question 26

A developer is writing an AWS Lambda function. The developer wants to log key events that occur during the Lambda function and include a unique identifier to associate the events with a specific function invocation. Which of the following will help the developer accomplish this objective?

  1. Obtain the request identifier from the Lambda context object. Architect the application to write logs to the console.
  2. Obtain the request identifier from the Lambda event object. Architect the application to write logs to a file.
  3. Obtain the request identifier from the Lambda event object. Architect the application to write logs to the console.
  4. Obtain the request identifier from the Lambda context object. Architect the application to write logs to a file.

Question 27

A company experienced partial downtime during the last deployment of a new application. AWS Elastic Beanstalk split the environment's Amazon EC2 instances into batches and deployed a new version one batch at a time after taking them out of service. Therefore, full capacity was not maintained during deployment. The developer plans to release a new version of the application, and is looking for a policy that will maintain full capacity and minimize the impact of the failed deployment. Which deployment policy should the developer use?

  1. Immutable
  2. All at Once
  3. Rolling
  4. Rolling with an Additional Batch

Question 28

A company is providing services to many downstream consumers. Each consumer may connect to one or more services. This has resulted in a complex architecture that is difficult to manage and does not scale well. The company needs a single interface to manage these services to consumers. Which AWS service should be used to refactor this architecture?

  1. AWS Lambda
  2. AWS X-Ray
  3. Amazon SQS
  4. Amazon API Gateway

Question 29

When a Developer tries to run an AWS CodeBuild project, it raises an error because the length of all environment variables exceeds the limit for the combined maximum of characters. What is the recommended solution?

  1. Add the export LC_ALL=ג€en_US.utf8ג€ command to the pre_build section to ensure POSIX localization.
  2. Use Amazon Cognito to store key-value pairs for large numbers of environment variables.
  3. Update the settings for the build project to use an Amazon S3 bucket for large numbers of environment variables.
  4. Use AWS Systems Manager Parameter Store to store large numbers of environment variables.

Question 30

A Development team decides to adopt a continuous integration/continuous delivery (CI/CD) process using AWS CodePipeline and AWS CodeCommit for a new application. However, management wants a person to review and approve the code before it is deployed to production. How can the Development team add a manual approver to the CI/CD pipeline?

  1. Use AWS SES to send an email to approvers when their action is required. Develop a simple application that allows approvers to accept or reject a build. Invoke an AWS Lambda function to advance the pipeline when a build is accepted.
  2. If approved, add an approved tag when pushing changes to the CodeCommit repository. CodePipeline will proceed to build and deploy approved commits without interruption.
  3. Add an approval step to CodeCommit. Commits will not be saved until approved.
  4. Add an approval action to the pipeline. Configure the approval action to publish to an Amazon SNS topic when approval is required. The pipeline execution will stop and wait for an approval.