DVA-C01 : AWS Certified Developer Associate : Part 12

  1. A company has a web application that uses an Amazon Cognito user pool for authentication. The company wants to create a login page with the company logo.

    What should a Developer do to meet these requirements?

    • Create a hosted user interface in Amazon Cognito and customize it with the company logo.
    • Create a login page with the company logo and upload it to Amazon Cognito.
    • Create a login page in Amazon API Gateway with the logo and save the link in Amazon Cognito.
    • Upload the logo to the Amazon Cognito app settings and point to the logo on a custom login page.
  2. A Developer wants the ability to roll back to a previous version of an AWS Lambda function in the event of errors caused by a new deployment.

    How can the Developer achieve this with MINIMAL impact on users?

    • Change the application to use an alias that points to the current version. Deploy the new version of the code. Update the alias to use the newly deployed version. If too many errors are encountered, point the alias back to the previous version.
    • Change the application to use an alias that points to the current version. Deploy the new version of the code. Update the alias to direct 10% of users to the newly deployed version. If too many errors are encountered, send 100% of traffic to the previous version.
    • Do not make any changes to the application. Deploy the new version of the code. If too many errors are encountered, point the application back to the previous version using the version number in the Amazon Resource Name (ARN).
    • Create three aliases: new, existing, and router. Point the existing alias to the current version. Have the router alias direct 100% of users to the existing alias. Update the application to use the router alias. Deploy the new version of the code. Point the new alias to this version. Update the router alias to direct 10% of users to the new alias. If too many errors are encountered, send 100% of traffic to the existing alias.
  3. A company is developing an application that will be accessed through the Amazon API Gateway REST API. Registered users should be the only ones who can access certain resources of this API. The token being used should expire automatically and needs to be refreshed periodically.

    How can a Developer meet these requirements?

    • Create an Amazon Cognito identity pool, configure the Amazon Cognito Authorizer in API Gateway, and use the temporary credentials generated by the identity pool.
    • Create and maintain a database record for each user with a corresponding token and use an AWS Lambda authorizer in API Gateway.
    • Create an Amazon Cognito user pool, configure the Cognito Authorizer in API Gateway, and use the identity or access token.
    • Create an IAM user for each API user, attach an invoke permissions policy to the API, and use an IAM authorizer in API Gateway.
  4. A Developer is working on a serverless project based in Java. Initial testing shows a cold start takes about 8 seconds on average for AWS Lambda functions.

    What should the Developer do to reduce the cold start time? (Choose two.)

    • Add the Spring Framework to the project and enable dependency injection.
    • Reduce the deployment package by including only needed modules from the AWS SDK for Java.
    • Increase the memory allocation setting for the Lambda function.
    • Increase the timeout setting for the Lambda function.
    • Change the Lambda invocation mode from synchronous to asynchronous.
  5. A company’s ecommerce website is experiencing massive traffic spikes, which are causing performance problems in the company database. Users are reporting that accessing the website takes a long time.

    A Developer wants to implement a caching layer using Amazon ElastiCache. The website is required to be responsive no matter which product a user views, and the updates to product information and prices must be strongly consistent.

    Which cache writing policy will satisfy these requirements?

    • Write to the cache directly and sync the backend at a later time
    • Write to the backend first and wait for the cache to expire
    • Write to the cache and the backend at the same time
    • Write to the backend first and invalidate the cache
  6. An online retail company has deployed a serverless application with AWS Lambda, Amazon API Gateway, Amazon S3, and Amazon DynamoDB using AWS CloudFormation. The company rolled out a new release with major upgrades to the Lambda function and deployed the release to production. Subsequently, the application stopped working.

    Which solution should bring the application back up as quickly as possible?

    • Redeploy the application on Amazon EC2 so the Lambda function can resolve dependencies
    • Migrate DynamoDB to Amazon RDS and redeploy the Lambda function
    • Roll back the Lambda function to the previous version
    • Deploy the latest Lambda function in a different Region
  7. A Developer is writing an application that will run on Amazon EC2 instances in an Auto Scaling group. The Developer wants to externalize session state to support the application.

    Which services will meet these needs? (Choose two.)

    • Amazon DynamoDB
    • Amazon Cognito
    • Amazon ElastiCache
    • Amazon EBS
    • Amazon SQS
  8. A Developer has a legacy application that is hosted on-premises. Other applications hosted on AWS depend on the on-premises application for proper functioning. In case of any application errors, the Developer wants to be able to use Amazon CloudWatch to monitor and troubleshoot all applications from one place.

    How can the Developer accomplish this?

    • Install an AWS SDK on the on-premises server to automatically send logs to CloudWatch.
    • Download the CloudWatch agent to the on-premises server. Configure the agent to use IAM user credentials with permissions for CloudWatch.
    • Upload log files from the on-premises server to Amazon S3 and have CloudWatch read the files.
    • Upload log files from the on-premises server to an Amazon EC2 instance and have the instance forward the logs to CloudWatch.
  9. An application ingests a large number of small messages and stores them in a database. The application uses AWS Lambda. A Development team is making changes to the application’s processing logic. In testing, it is taking more than 15 minutes to process each message. The team is concerned the current backend may time out.

    Which changes should be made to the backend system to ensure each message is processed in the MOST scalable way?

    • Add the messages to an Amazon SQS queue. Set up and Amazon EC2 instance to poll the queue and process messages as they arrive.
    • Add the messages to an Amazon SQS queue. Set up Amazon EC2 instances in an Auto Scaling group to poll the queue and process the messages as they arrive.
    • Create a support ticket to increase the Lambda timeout to 60 minutes to allow for increased processing time.
    • Change the application to directly insert the body of the message into an Amazon RDS database.
  10. An advertising company has a dynamic website with heavy traffic. The company wants to migrate the website infrastructure to AWS to handle everything except website development.

    Which solution BEST meets these requirements?

    • Use AWS VM Import to migrate a web server image to AWS. Launch the image on a compute-optimized Amazon EC2 instance.
    • Launch multiple Amazon Lightsail instances behind a load balancer. Set up the website on those instances.
    • Deploy the website code in an AWS Elastic Beanstalk environment. Use Auto Scaling to scale the numbers of instances.
    • Use Amazon S3 to host the website. Use Amazon CloudFront to deliver the content at scale.
  11. A Software Engineer developed an AWS Lambda function in Node.js to do some CPU-intensive data processing. With the default settings, the Lambda function takes about 5 minutes to complete.

    Which approach should a Developer take to increase the speed of completion?

    • Instead of using Node.js, rewrite the Lambda function using Python.
    • Instead of packaging the libraries in the ZIP file with the function, move them to a Lambda layer and use the layer with the function.
    • Allocate the maximum available CPU units to the function.
    • Increase the available memory to the function.
  12. A company has implemented AWS CodePipeline to automate its release pipelines. The Development team is writing an AWS Lambda function what will send notifications for state changes of each of the actions in the stages.

    Which steps must be taken to associate the Lambda function with the event source?

    • Create a trigger that invokes the Lambda function from the Lambda console by selecting CodePipeline as the event source.
    • Create an event trigger and specify the Lambda function from the CodePipeline console.
    • Create an Amazon CloudWatch alarm that monitors status changes in Code Pipeline and triggers the Lambda function.
    • Create an Amazon CloudWatch Events rule that uses CodePipeline as an event source.
  13. A Developer has built an application running on AWS Lambda using AWS Serverless Application Model (AWS SAM).

    What is the correct order of execution to successfully deploy the application?

    • 1. Build the SAM template in Amazon EC2.
      2. Package the SAM template to Amazon EBS storage.
      3. Deploy the SAM template from Amazon EBS.
    • 1. Build the SAM template locally.
      2. Package the SAM template onto Amazon S3.
      3. Deploy the SAM template from Amazon S3.
    • 1. Build the SAM template locally.
      2. Deploy the SAM template from Amazon S3.
      3. Package the SAM template for use.
    • 1. Build the SAM template locally.
      2. Package the SAM template from AWS CodeCommit.
      3. Deploy the SAM template to CodeCommit.
  14. A company wants to migrate an imaging service to Amazon EC2 while following security best practices. The images are sourced and read from a non-public Amazon S3 bucket.

    What should a Developer do to meet these requirements?

    • Create an IAM user with read-only permissions for the S3 bucket. Temporarily store the user credentials in the Amazon EBS volume of the EC2 instance.
    • Create an IAM user with read-only permissions for the S3 bucket. Temporarily store the user credentials in the user data of the EC2 instance.
    • Create an EC2 service role with read-only permissions for the S3 bucket. Attach the role to the EC2 instance.
    • Create an S3 service role with read-only permissions for the S3 bucket. Attach the role to the EC2 instance.
  15. A Development team wants to immediately build and deploy an application whenever there is a change to the source code.

    Which approaches could be used to trigger the deployment? (Choose two.)

    • Store the source code in an Amazon S3 bucket. Configure AWS CodePipeline to start whenever a file in the bucket changes.
    •  Store the source code in an encrypted Amazon EBS volume. Configure AWS CodePipeline to start whenever a file in the volume changes.
    • Store the source code in an AWS CodeCommit repository. Configure AWS CodePipeline to start whenever a change is committed to the repository.
    • Store the source code in an Amazon S3 bucket. Configure AWS CodePipeline to start every 15 minutes.
    • Store the source code in an Amazon EC2 instance’s ephemeral storage. Configure the instance to start AWS CodePipeline whenever there are changes to the source code.
  16. A company has implemented AWS CodeDeploy as part of its cloud native CI/CD stack. The company enables automatic rollbacks while deploying a new version of a popular web application from in-place to Amazon EC2.

    What occurs if the deployment of the new version fails due to code regression?

    • The last known good deployment is automatically restored using the snapshot stored in Amazon S3.
    • CodeDeploy switches the Amazon Route 53 alias records back to the known good green deployment and terminates the failed blue deployment.
    • A new deployment of the last known version of the application is deployed with a new deployment ID.
    • AWS CodePipeline promotes the most recent deployment with a SUCCEEDED status to production.
  17. A software company needs to make sure user-uploaded documents are securely stored in Amazon S3. The documents must be encrypted at rest in Amazon S3. The company does not want to manage the security infrastructure in-house, but the company still needs extra protection to ensure it has control over its encryption keys due to industry regulations.

    Which encryption strategy should a Developer use to meet these requirements?

    • Server-side encryption with Amazon S3 managed keys (SSE-S3)
    • Server-side encryption with customer-provided encryption keys (SSE-C)
    • Server-side encryption with AWS KMS managed keys (SSE-KMS)
    • Client-side encryption
  18. A Developer uses Amazon S3 buckets for static website hosting. The Developer creates one S3 bucket for the code and another S3 bucket for the assets, such as image and video files. Access is denied when a user attempts to access the assets bucket from the code bucket, with the website application showing a 403 error.

    How should the Developer solve this issue?

    • Create an IAM role and apply it to the assets bucket for the code bucket to be granted access.
    • Edit the bucket policy of the assets bucket to open access to all principals.
    • Edit the cross-origin resource sharing (CORS) configuration of the assets bucket to allow any origin to access the assets.
    • Change the code bucket to use AWS Lambda functions instead of static website hosting.
  19. A Developer migrated a web application to AWS. As part of the migration, the Developer implemented an automated continuous integration/continuous improvement (CI/CD) process using a blue/green deployment. The deployment provisions new Amazon EC2 instances in an Auto Scaling group behind a new Application Load Balancer. After the migration was completed, the Developer began receiving complaints from users getting booted out of the system. The system also requires users to log in after every new deployment.

    How can these issues be resolved?

    • Use rolling updates instead of a blue/green deployment
    • Externalize the user sessions to Amazon ElastiCache
    • Turn on sticky sessions in the Application Load Balancer
    • Use multicast to replicate session information
  20. A Developer wants to insert a record into an Amazon DynamoDB table as soon as a new file is added to an Amazon S3 bucket.

    Which set of steps would be necessary to achieve this?

    • Create an event with Amazon CloudWatch Events that will monitor the S3 bucket and then insert the records into DynamoDB.
    • Configure an S3 event to invoke a Lambda function that inserts records into DynamoDB.
    • Create a Lambda function that will poll the S3 bucket and then insert the records into DynamoDB.
    • Create a cron job that will run at a scheduled time and insert the records into DynamoDB.
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments