Amazon

DVA-C02 Free Practice Questions — Page 25

Question 242

A developer created an AWS Lambda function that performs a series of operations that involve multiple AWS services. The function's duration time is higher than normal. To determine the cause of the issue, the developer must investigate traffic between the services without changing the function code. Which solution will meet these requirements?

A. Enable AWS X-Ray active tracing in the Lambda function. Review the logs in X-Ray.
B. Configure AWS CloudTrail. View the trail logs that are associated with the Lambda function.
C. Review the AWS Config logs in Amazon CloudWatch.
D. Review the Amazon CloudWatch logs that are associated with the Lambda function.
Show Answer
Correct Answer: A
Explanation:
AWS X-Ray active tracing provides end-to-end request tracing across supported AWS services and visualizes service maps and latency breakdowns without requiring changes to the Lambda function code. This is designed to investigate traffic between services and identify performance bottlenecks. CloudTrail records API activity, CloudWatch Logs contain application logs, and AWS Config tracks resource configuration changes, none of which provide distributed tracing across service calls.

Question 243

A company has a social media application that receives large amounts of traffic. User posts and interactions are continuously updated in an Amazon RDS database. The data changes frequently, and the data types can be complex. The application must serve read requests with minimal latency. The application's current architecture struggles to deliver these rapid data updates efficiently. The company needs a solution to improve the application's performance. Which solution will meet these requirements?

A. Use Amazon DynamoDB Accelerator (DAX) in front of the RDS database to provide a caching layer for the high volume of rapidly changing data.
B. Set up Amazon S3 Transfer Acceleration on the RDS database to enhance the speed of data transfer from the databases to the application.
C. Add an Amazon CloudFront distribution in front of the RDS database to provide a caching layer for the high volume of rapidly changing data.
D. Create an Amazon ElastiCache for Redis cluster. Update the application code to use a write-through caching strategy and read the data from Redis.
Show Answer
Correct Answer: D
Explanation:
Amazon ElastiCache for Redis is the appropriate caching layer for an Amazon RDS-backed application with frequently changing, complex data that requires very low-latency reads. A write-through caching strategy keeps Redis synchronized with RDS by updating both on writes, allowing subsequent reads to be served from in-memory cache. DAX only accelerates DynamoDB, not RDS. S3 Transfer Acceleration is unrelated to database query performance. CloudFront caches web content at edge locations and is not a database cache for rapidly changing RDS data.

Question 244

A company's developer has deployed an application in AWS by using AWS CloudFormation. The CloudFormation stack includes parameters in AWS Systems Manager Parameter Store that the application uses as configuration settings. The application can modify the parameter values. When the developer updated the stack to create additional resources with tags, the developer noted that the parameter values were reset and that the values ignored the latest changes made by the application. The developer needs to change the way the company deploys the CloudFormation stack. The developer also needs to avoid resetting the parameter values outside the stack. Which solution will meet these requirements with the LEAST development effort?

A. Modify the CloudFormation stack to set the deletion policy to Retain for the Parameter Store parameters.
B. Create an Amazon DynamoDB table as a resource in the CloudFormation stack to hold configuration data for the application. Migrate the parameters that the application is modifying from Parameter Store to the DynamoDB table.
C. Create an Amazon RDS DB instance as a resource in the CloudFormation stack. Create a table in the database for parameter configuration. Migrate the parameters that the application is modifying from Parameter Store to the configuration table.
D. Modify the CloudFormation stack policy to deny updates on Parameter Store parameters.
Show Answer
Correct Answer: D
Explanation:
A stack update causes CloudFormation to reconcile managed resources with the template. Because the SSM parameter is managed by the stack, CloudFormation can overwrite application-modified values during updates. A stack policy that denies updates to the SSM Parameter resource prevents CloudFormation from modifying that resource during future stack updates while still allowing updates to other resources. DeletionPolicy only affects deletion or replacement scenarios, not ordinary in-place updates. DynamoDB and RDS require significantly more development effort. Sources: https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-resource-ssm-parameter.html

Question 245

A developer is deploying a company's application to Amazon EC2 instances. The application generates gigabytes of data files each day. The files are rarely accessed, but the files must be available to the application's users within minutes of a request during the first year of storage. The company must retain the files for 7 years. How can the developer implement the application to meet these requirements MOST cost-effectively?

A. Store the files in an Amazon S3 bucket. Use the S3 Glacier Instant Retrieval storage class. Create an S3 Lifecycle policy to transition the files to the S3 Glacier Deep Archive storage class after 1 year.
B. Store the files in an Amazon S3 bucket. Use the S3 Standard storage class. Create an S3 Lifecycle policy to transition the files to the S3 Glacier Flexible Retrieval storage class after 1 year.
C. Store the files on an Amazon Elastic Block Store (Amazon EBS) volume. Use Amazon Data Lifecycle Manager (Amazon DLM) to create snapshots of the EBS volumes and to store those snapshots in Amazon S3.
D. Store the files on an Amazon Elastic File System (Amazon EFS) mount. Configure EFS lifecycle management to transition the files to the EFS Standard- Infrequent Access (Standard-IA) storage class after 1 year.
Show Answer
Correct Answer: A
Explanation:
S3 is the most cost-effective service for large volumes of object data. During the first year, the files must be retrievable within minutes, which is satisfied by S3 Glacier Instant Retrieval (millisecond access, suitable for rarely accessed archival data). After one year, when the requirement for quick retrieval no longer applies, transitioning to S3 Glacier Deep Archive minimizes long-term storage costs for the remaining 6 years. EBS and EFS are significantly more expensive for this use case, and S3 Standard is unnecessary during the first year because Glacier Instant Retrieval already meets the retrieval requirement at lower cost.

Question 246

A developer is investigating an issue in part of a company's application. In the application, messages are sent to an Amazon Simple Queue Service (Amazon SQS) queue. The AWS Lambda function polls messages from the SQS queue and sends email messages by using Amazon Simple Email Service (Amazon SES). Users have been receiving duplicate email messages during periods of high traffic. Which reasons could explain the duplicate email messages? (Choose two.)

A. Standard SQS queues support at-least-once message delivery.
B. Standard SQS queues support exactly-once processing, so the duplicate email messages are because of user error.
C. Amazon SES has the DomainKeys Identified Mail (DKIM) authentication incorrectly configured.
D. The SQS queue's visibility timeout is lower than or the same as the Lambda function's timeout.
E. The Amazon SES bounce rate metric is too high.
Show Answer
Correct Answer: A, D
Explanation:
Standard Amazon SQS queues provide at-least-once delivery, so duplicate message delivery is possible. Additionally, if the SQS visibility timeout is less than or equal to the Lambda function timeout, a message can become visible again before processing completes, causing another Lambda invocation and duplicate email sends. DKIM configuration and SES bounce rate do not cause duplicate email delivery.

Question 247

A data visualization company wants to strengthen the security of its core applications. The applications are deployed on AWS across its development, staging, pre-production, and production environments. The company needs to encrypt all of its stored sensitive credentials. The sensitive credentials need to be automatically rotated. A version of the sensitive credentials need to be stored for each environment. Which solution will meet these requirements in the MOST operationally efficient way?

A. Configure AWS Secrets Manager versions to store different copies of the same credentials across multiple environments.
B. Create a new parameter version in AWS Systems Manager Parameter Store for each environment. Store the environment-specific credentials in the parameter version.
C. Configure the environment variables in the application code. Use different names for each environment type.
D. Configure AWS Secrets Manager to create a new secret for each environment type. Store the environment-specific credentials in the secret.
Show Answer
Correct Answer: D
Explanation:
AWS Secrets Manager is designed for storing, encrypting, and automatically rotating sensitive credentials. Separate environments (development, staging, pre-production, production) should use separate secrets because they represent different credential sets and lifecycles. Secrets Manager versions are intended for tracking changes to the same secret over time during rotation, not for storing different environment-specific credentials. Systems Manager Parameter Store versions are similarly for revisions of a parameter rather than different environments, and environment variables alone do not provide secure storage and automatic rotation.

Question 248

A company runs an application on AWS. The application uses an AWS Lambda function that is configured with an Amazon Simple Queue Service (Amazon SQS) queue called high priority queue as the event source. A developer is updating the Lambda function with another SQS queue called low priority queue as the event source. The Lambda function must always read up to 10 simultaneous messages from the high priority queue before processing messages from low priority queue. The Lambda function must be limited to 100 simultaneous invocations. Which solution will meet these requirements?

A. Set the event source mapping batch size to 10 for the high priority queue and to 90 for the low priority queue.
B. Set the delivery delay to 0 seconds for the high priority queue and to 10 seconds for the low priority queue.
C. Set the event source mapping maximum concurrency to 10 for the high priority queue and to 90 for the low priority queue.
D. Set the event source mapping batch window to 10 for the high priority queue and to 90 for the low priority queue.
Show Answer
Correct Answer: C
Explanation:
Use Lambda event source mapping maximum concurrency to control how many concurrent Lambda invocations each SQS queue can consume. Configure the high-priority queue with maximum concurrency of 10 and the low-priority queue with 90, and limit the Lambda function itself to 100 concurrent invocations (via reserved concurrency). Batch size, delivery delay, and batch window do not control concurrent invocation allocation between event sources.

Question 249

A company has an application that runs across multiple AWS Regions. The application is experiencing performance issues at irregular intervals. A developer must use AWS X-Ray to implement distributed tracing for the application to troubleshoot the root cause of the performance issues. What should the developer do to meet this requirement?

A. Use the X-Ray console to add annotations for AWS services and user-defined services.
B. Use Region annotation that X-Ray adds automatically for AWS services. Add Region annotation for user-defined services.
C. Use the X-Ray daemon to add annotations for AWS services and user-defined services.
D. Use Region annotation that X-Ray adds automatically for user-defined services. Configure X-Ray to add Region annotation for AWS services.
Show Answer
Correct Answer: B
Explanation:
AWS X-Ray automatically adds a Region annotation for AWS service segments. For user-defined (custom) services, the application must be instrumented with the X-Ray SDK to add the Region annotation so traces can be correlated across multiple AWS Regions. The X-Ray console and daemon do not add annotations in the way described by the other options.

Question 250

A developer is creating an Amazon DynamoDB table by using the AWS CLI. The DynamoDB table must use server-side encryption with an AWS owned encryption key. How should the developer create the DynamoDB table to meet these requirements?

A. Create an AWS Key Management Service (AWS KMS) customer managed key. Provide the key's Amazon Resource Name (ARN) in the KMSMasterKeyId parameter during creation of the DynamoDB table.
B. Create an AWS Key Management Service (AWS KMS) AWS managed key. Provide the key's Amazon Resource Name (ARN) in the KMSMasterKeyId parameter during creation of the DynamoDB table.
C. Create an AWS owned key. Provide the key's Amazon Resource Name (ARN) in the KMSMasterKeyId parameter during creation of the DynamoDB table.
D. Create the DynamoDB table with the default encryption options.
Show Answer
Correct Answer: D
Explanation:
Amazon DynamoDB encrypts all tables at rest by default. If no server-side encryption settings are specified when creating the table, DynamoDB uses an AWS owned key by default. AWS owned keys do not require you to create or reference a KMS key ARN. Options A and B use customer managed or AWS managed KMS keys, and option C is invalid because AWS owned keys are not created or referenced directly by customers.

Question 251

A developer is creating a serverless application that uses an AWS Lambda function. The developer will use AWS CloudFormation to deploy the application. The application will write logs to Amazon CloudWatch Logs. The developer has created a log group in a CloudFormation template for the application to use. The developer needs to modify the CloudFormation template to make the name of the log group available to the application at runtime. Which solution will meet this requirement?

A. Use the AWS::Include transform in CloudFormation to provide the log group's name to the application.
B. Pass the log group's name to the application in the user data section of the CloudFormation template.
C. Use the CloudFormation template's Mappings section to specify the log group's name for the application.
D. Pass the log group's Amazon Resource Name (ARN) as an environment variable to the Lambda function.
Show Answer
Correct Answer: D
Explanation:
The Lambda function needs the log group identifier available at runtime. CloudFormation can inject resource attributes into Lambda environment variables using intrinsic functions (such as Ref or GetAtt). Passing the log group's ARN as an environment variable satisfies the requirement. AWS::Include is unrelated, EC2 user data does not apply to Lambda, and Mappings are compile-time template lookups rather than runtime configuration for the function.

$19

Get all 553 questions with detailed answers and explanations

  • Instant download HTML + PDF delivered the moment payment clears.
  • Secure Stripe checkout we never see or store your card details.
  • 7-day refund if files are defective see our refund policy.