Amazon AWS Certified Developer - Associate DVA-C02
Prev

There are 313 results

Next
#251 (Accuracy: 100% / 4 votes)
A development team maintains a web application by using a single AWS RDS, template. The template defines web servers and an Amazon RDS database. The team uses the CloudFormation template to deploy the CloudFormation stack to different environments.

During a recent application deployment, a developer caused the primary development database to be dropped and recreated.
The result of this incident was a loss of data. The team needs to avoid accidental database deletion in the future.

Which solutions will meet these requirements? (Choose two.)
  • A. Add a CloudFormation DeletionPolicy attribute with the Retain value to the database resource.
  • B. Update the CloudFormation stack policy to prevent updates to the database.
  • C. Modify the database to use a Multi-AZ deployment.
  • D. Create a CloudFormation stack set for the web application and database deployments.
  • E. Add a CloudFormation DeletionPolicy attribute with the Retain value to the stack.
#252 (Accuracy: 100% / 3 votes)
A company is using AWS CloudFormation to deploy a two-tier application. The application will use Amazon RDS as its backend database. The company wants a solution that will randomly generate the database password during deployment. The solution also must automatically rotate the database password without requiring changes to the application.

What is the MOST operationally efficient solution that meets these requirements?
  • A. Use an AWS Lambda function as a CloudFormation custom resource to generate and rotate the password.
  • B. Use an AWS Systems Manager Parameter Store resource with the SecureString data type to generate and rotate the password.
  • C. Use a cron daemon on the application’s host to generate and rotate the password.
  • D. Use an AWS Secrets Manager resource to generate and rotate the password.
#253 (Accuracy: 100% / 4 votes)
A developer is working on a Python application that runs on Amazon EC2 instances. The developer wants to enable tracing of application requests to debug performance issues in the code.

Which combination of actions should the developer take to achieve this goal? (Choose two.)
  • A. Install the Amazon CloudWatch agent on the EC2 instances.
  • B. Install the AWS X-Ray daemon on the EC2 instances.
  • C. Configure the application to write JSON-formatted logs to /var/log/cloudwatch.
  • D. Configure the application to write trace data to /var/log/xray.
  • E. Install and configure the AWS X-Ray SDK for Python in the application.
#254 (Accuracy: 100% / 7 votes)
A company is building an application for stock trading. The application needs sub-millisecond latency for processing trade requests. The company uses Amazon DynamoDB to store all the trading data that is used to process each trading request.

A development team performs load testing on the application and finds that the data retrieval time is higher than expected.
The development team needs a solution that reduces the data retrieval time with the least possible effort.

Which solution meets these requirements?
  • A. Add local secondary indexes (LSIs) for the trading data.
  • B. Store the trading data in Amazon S3, and use S3 Transfer Acceleration.
  • C. Add retries with exponential backoff for DynamoDB queries.
  • D. Use DynamoDB Accelerator (DAX) to cache the trading data.
#255 (Accuracy: 100% / 4 votes)
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?
  • A. Add the export LC_ALL="en_US.utf8" command to the pre_build section to ensure POSIX localization.
  • B. Use Amazon Cognito to store key-value pairs for large numbers of environment variables.
  • C. Update the settings for the build project to use an Amazon S3 bucket for large numbers of environment variables.
  • D. Use AWS Systems Manager Parameter Store to store large numbers of environment variables.
#256 (Accuracy: 100% / 4 votes)
A developer is modifying an existing AWS Lambda function. While checking the code, the developer notices hardcoded parameter values for an Amazon RDS for SQL Server user name, password, database, host, and port. There are also hardcoded parameter values for an Amazon DynamoDB table, an Amazon S3 bucket, and an Amazon Simple Notification Service (Amazon SNS) topic.

The developer wants to securely store the parameter values outside the code in an encrypted format and wants to turn on rotation for the credentials.
The developer also wants to be able to reuse the parameter values from other applications and to update the parameter values without modifying code.

Which solution will meet these requirements with the LEAST operational overhead?
  • A. Create an RDS database secret in AWS Secrets Manager. Set the user name, password, database, host, and port. Turn on secret rotation. Create encrypted Lambda environment variables for the DynamoDB table, S3 bucket, and SNS topic.
  • B. Create an RDS database secret in AWS Secrets Manager. Set the user name, password, database, host, and port. Turn on secret rotation. Create SecureString parameters in AWS Systems Manager Parameter Store for the DynamoDB table, S3 bucket, and SNS topic.
  • C. Create RDS database parameters in AWS Systems Manager Parameter Store for the user name, password, database, host, and port. Create encrypted Lambda environment variables for the DynamoDB table, S3 bucket, and SNS topic. Create a Lambda function and set the logic for the credentials rotation task. Schedule the credentials rotation task in Amazon EventBridge.
  • D. Create RDS database parameters in AWS Systems Manager Parameter Store for the user name, password, database, host, and port. Store the DynamoDB table, S3 bucket, and SNS topic in Amazon S3. Create a Lambda function and set the logic for the credentials rotation. Invoke the Lambda function on a schedule.
#257 (Accuracy: 100% / 4 votes)
A mobile app stores blog posts in an Amazon DynamoDB table. Millions of posts are added every day, and each post represents a single item in the table. The mobile app requires only recent posts. Any post that is older than 48 hours can be removed.

What is the MOST cost-effective way to delete posts that are older than 48 hours?
  • A. For each item, add a new attribute of type String that has a timestamp that is set to the blog post creation time. Create a script to find old posts with a table scan and remove posts that are older than 48 hours by using the BatchWriteItem API operation. Schedule a cron job on an Amazon EC2 instance once an hour to start the script.
  • B. For each item, add a new attribute of type String that has a timestamp that is set to the blog post creation time. Create a script to find old posts with a table scan and remove posts that are older than 48 hours by using the BatchWriteItem API operation. Place the script in a container image. Schedule an Amazon Elastic Container Service (Amazon ECS) task on AWS Fargate that invokes the container every 5 minutes.
  • C. For each item, add a new attribute of type Date that has a timestamp that is set to 48 hours after the blog post creation time. Create a global secondary index (GSI) that uses the new attribute as a sort key. Create an AWS Lambda function that references the GSI and removes expired items by using the BatchWriteItem API operation. Schedule the function with an Amazon CloudWatch event every minute.
  • D. For each item, add a new attribute of type Number that has a timestamp that is set to 48 hours after the blog post creation time. Configure the DynamoDB table with a TTL that references the new attribute.
#258 (Accuracy: 100% / 4 votes)
A developer has an application that is composed of many different AWS Lambda functions. The Lambda functions all use some of the same dependencies. To avoid security issues, the developer is constantly updating the dependencies of all of the Lambda functions. The result is duplicated effort for each function.

How can the developer keep the dependencies of the Lambda functions up to date with the LEAST additional complexity?
  • A. Define a maintenance window for the Lambda functions to ensure that the functions get updated copies of the dependencies.
  • B. Upgrade the Lambda functions to the most recent runtime version.
  • C. Define a Lambda layer that contains all of the shared dependencies.
  • D. Use an AWS CodeCommit repository to host the dependencies in a centralized location.
#259 (Accuracy: 100% / 4 votes)
A company is using Amazon RDS as the backend database for its application. After a recent marketing campaign, a surge of read requests to the database increased the latency of data retrieval from the database. The company has decided to implement a caching layer in front of the database. The cached content must be encrypted and must be highly available.

Which solution will meet these requirements?
  • A. Amazon CloudFront
  • B. Amazon ElastiCache for Memcached
  • C. Amazon ElastiCache for Redis in cluster mode
  • D. Amazon DynamoDB Accelerator (DAX)
#260 (Accuracy: 100% / 4 votes)
A developer at a company needs to create a small application that makes the same API call once each day at a designated time. The company does not have infrastructure in the AWS Cloud yet, but the company wants to implement this functionality on AWS.

Which solution meets these requirements in the MOST operationally efficient manner?
  • A. Use a Kubernetes cron job that runs on Amazon Elastic Kubernetes Service (Amazon EKS).
  • B. Use an Amazon Linux crontab scheduled job that runs on Amazon EC2.
  • C. Use an AWS Lambda function that is invoked by an Amazon EventBridge scheduled event.
  • D. Use an AWS Batch job that is submitted to an AWS Batch job queue.