Amazon Web Services certification · Exam DVA-C02

DVA-C02 Mock Exam Page 7

AWS Certified Developer - Associate

Free DVA-C02 mock exam questions 61–70, each with the answer and an explanation.

20 questions · 33 minutes · free, no sign-up

Free DVA-C02 questions

61–70 of 110 free
Question 61 Choose 1
A developer needs to export the contents of several Amazon DynamoDB tables into Amazon S3 buckets to comply with company data regulations. The developer uses the AWS CLI to run commands to export from each table to the proper S3 bucket. The developer sets up AWS credentials correctly and grants resources appropriate permissions. However, the exports of some tables fail. What should the developer do to resolve this issue?
Show answerHide answer

Correct answer: B Ensure that the target S3 bucket is in the same AWS Region as the DynamoDB table.

Explanation

Explanation:
Comprehensive Detailed and Lengthy Step-by-Step Explanation with All AWS Developer References:
1. Understanding the Use Case:
The developer needs to export DynamoDB table data into Amazon S3 buckets using the AWS CLI, and some exports are failing. Proper credentials and permissions have already been configured.
2. Key Conditions to Check:
Region Consistency:DynamoDB exports require that the target S3 bucket and the DynamoDB table reside in the same AWS Region. If they are not in the same Region, the export process will fail.
Point-in-Time Recovery (PITR):PITR is not required for exporting data from DynamoDB to S3. Enabling PITR allows recovery of table states at specific points in time but does not directly influence export functionality.
DynamoDB Streams:Streams allow real-time capture of data modifications but are unrelated to the bulk export feature.
DAX (DynamoDB Accelerator):DAX is a caching service that speeds up read operations for DynamoDB but does not affect the export functionality.
3. Explanation of the Options:
Option A:"Ensure that point-in-time recovery is enabled on the DynamoDB tables."While PITR is useful for disaster recovery and restoring table states, it is not required for exporting data to S3. This option does not address the export failure.
Option B:"Ensure that the target S3 bucket is in the same AWS Region as the DynamoDB table."This is the correct answer. DynamoDB export functionality requires the target S3 bucket to reside in the same AWS Region as the DynamoDB table. If the S3 bucket is in a different Region, the export will fail. Option C:"Ensure that DynamoDB streaming is enabled for the tables."Streams are useful for capturing real-time changes in DynamoDB tables but are unrelated to the export functionality. This option does not resolve the issue.
Option D:"Ensure that DynamoDB Accelerator (DAX) is enabled."DAX accelerates read operations but does not influence the export functionality. This option is irrelevant to the issue.
Question 62 Choose 1
A developer is creating an AWS Lambda function that will connect to an Amazon RDS for MySQL instance. The developer wants to store the database credentials. The database credentials need to be encrypted and the database password needs to be automatically rotated.
Which solution will meet these requirements?
Show answerHide answer

Correct answer: B Store the database credentials in AWS Secrets Manager. Set up managed rotation on the database credentials.

Question 63 Choose 1
A company uses an AWS Lambda function to transfer files from an Amazon S3 bucket to the company's SFTP server. The Lambda function connects to the SFTP server by using credentials such as username and password. The company uses Lambda environment variables to store these credentials.
A developer needs to implement encrypted username and password credentials.
Which solution will meet these requirements?
Show answerHide answer

Correct answer: B Move the user credentials from Lambda environment variables to AWS Systems Manager Parameter Store.

Question 64 Choose 1
A developer is building an application that stores objects in an Amazon S3 bucket. The bucket does not have versioning enabled. The objects are accessed rarely after 1 week. However, the objects must be immediately available at all times. The developer wants to optimize storage costs for the S3 bucket. Which solution will meet this requirement?
Show answerHide answer

Correct answer: B Create an S3 Lifecycle rule to transition objects to S3 Standard-Infrequent Access (S3 Standard-IA) after 7 days.

Explanation

Explanation:
Comprehensive Detailed and Lengthy Step-by-Step Explanation with All AWS Developer References:
1. Understanding the Use Case:
The goal is to store objects in an S3 bucket while optimizing storage costs. The key conditions are:
Objects are accessed infrequently after 1 week.
Objects must remainimmediately accessibleat all times.
2. AWS S3 Storage Classes Overview:
Amazon S3 offers various storage classes, each optimized for specific use cases:
S3 Standard:Best for frequently accessed data with low latency and high throughput needs.
S3 Standard-Infrequent Access (S3 Standard-IA):Optimized for infrequently accessed data but requires the same availability and immediate access as Standard storage. It provides lower storage costs but incurs retrieval charges.
S3 Glacier Flexible Retrieval (formerly S3 Glacier):Designed for archival data with retrieval latency ranging from minutes to hours. This does not meet the requirement for "immediate access."
S3 Glacier Deep Archive:Lowest-cost storage, suitable for rarely accessed data with retrieval times of hours.
3. Explanation of the Options:
Option A:"Create an S3 Lifecycle rule to expire objects after 7 days."Expiring objects after 7 days deletes them permanently, which does not fulfill the requirement of retaining the objects for later infrequent access.
Option B:"Create an S3 Lifecycle rule to transition objects to S3 Standard- Infrequent Access (S3 Standard-IA) after 7 days."This is the correct solution. S3 Standard-IA is ideal for objects accessed infrequently but still need to be available immediately. Transitioning objects to this storage class reduces storage costs while maintaining availability and low latency.
Option C:"Create an S3 Lifecycle rule to transition objects to S3 Glacier Flexible Retrieval after 7 days."S3 Glacier Flexible Retrieval is a low-cost archival solution.
However, it does not provideimmediate accessas retrieval requires minutes to hours. This option does not meet the requirement.
Option D:"Create an S3 Lifecycle rule to delete objects that have delete markers."This option is irrelevant to the given use case, as it addresses versioning cleanup, which is not enabled in the described S3 bucket.
4. Implementation Steps for Option B:
To transition objects to S3 Standard-IA after 7 days:
Navigate to the S3 Console:
Select the Target Bucket:
Set Up a Lifecycle Rule:
Define the Rule Name and Scope:
Configure Transitions:
Review and Save the Rule:
5. Cost Optimization Benefits:
Transitioning to S3 Standard-IA results in cost savings as it offers:
Lower storage costs compared to S3 Standard.
Immediate access to objects when required.However, remember that there is a retrieval cost associated with S3 Standard-IA, so it is best suited for data with low retrieval frequency.
Question 65 Choose 1
A company hosts a batch processing application on AWS Elastic Beanstalk with instances that run the most recent version of Amazon Linux. The application sorts and processes large datasets. In recent weeks, the application's performance has decreased significantly during a peak period for traffic. A developer suspects that the application issues are related to the memory usage. The developer checks the Elastic Beanstalk console and notices that memory usage is not being tracked. How should the developer gather more information about the application performance issues?
Show answerHide answer

Correct answer: C Configure the Amazon CloudWatch agent to track the memory usage of the instances.

Explanation

Explanation:
To monitor memory usage in Amazon Elastic Beanstalk environments, it's important to understand that default Elastic Beanstalk monitoring capabilities in Amazon CloudWatch do not track memory usage, as memory metrics are not collected by default. Instead, theAmazon CloudWatch agentmust be configured to collect memory usage metrics.
  • Why Option C is Correct:
  • How to Implement This Solution:
  • Why Other Options are Incorrect:
  • AWS Documentation References:
Question 66 Choose 1
A company is planning to deploy an application on AWS behind an Elastic Load Balancing (ELB) load balancer. The application uses an HTTP/HTTPS listener and must access the client IP addresses. Which load-balancing solution meets these requirements?
Show answerHide answer

Correct answer: B Use a Network Load Balancer (NLB). Enable proxy protocol support on the NLB and the target application.

Question 67 Choose 1
A developer is testing a new file storage application that uses an Amazon CloudFront distribution to serve content from an Amazon S3 bucket. The distribution accesses the S3 bucket by using an origin access identity (OAI). The S3 bucket's permissions explicitly deny access to all other users.
The application prompts users to authenticate on a login page and then uses signed cookies to allow users to access their personal storage directories. The developer has configured the distribution to use its default cache behavior with restricted viewer access and has set the origin to point to the S3 bucket. However, when the developer tries to navigate to the login page, the developer receives a 403 Forbidden error.
The developer needs to implement a solution to allow unauthenticated access to the login page. The solution also must keep all private content secure.
Which solution will meet these requirements?
Show answerHide answer

Correct answer: A Add a second cache behavior to the distribution with the same origin as the default cache behavior. Set the path pattern for the second cache behavior to the path of the login page, and make viewer access unrestricted. Keep the default cache behavior's settings unchanged.

Explanation

Explanation: The solution that will meet the requirements is to add a second cache behavior to the distribution with the same origin as the default cache behavior. Set the path pattern for the second cache behavior to the path of the login page, and make viewer access unrestricted. Keep the default cache behavior’s settings unchanged. This way, the login page can be accessed without authentication, while all other content remains secure and requires signed cookies. The other options either do not allow unauthenticated access to the login page, or expose private content to unauthorized users.
Question 68 Choose 1
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?
Show answerHide answer

Correct answer: B Use Region annotation that X-Ray adds automatically for AWS services Add Region annotation for user-defined services

Explanation

Explanation:
  • Distributed Tracing with X-Ray: X-Ray helps visualize request paths and identify bottlenecks in applications distributed across Regions.
  • Region Annotations (Automatic for AWS Services): X-Ray automatically adds a Region annotation to segments representing calls to AWS services. This aids in tracing cross-Region traffic.
  • Region Annotations (Manual for User-Defined): For segments representing calls to user-defined services in different Regions, the developer needs to add the Region annotation manually to enable comprehensive tracing.
Question 69 Choose 1
An Amazon Kinesis Data Firehose delivery stream is receiving customer data that contains personally identifiable information. A developer needs to remove pattern-based customer identifiers from the data and store the modified data in an Amazon S3 bucket. What should the developer do to meet these requirements?
Show answerHide answer

Correct answer: A Implement Kinesis Data Firehose data transformation as an AWS Lambda function. Configure the function to remove the customer identifiers. Set an Amazon S3 bucket as the destination of the delivery stream.

Explanation

Explanation: Amazon Kinesis Data Firehose is a service that delivers real-time streaming data to destinations such as Amazon S3, Amazon Redshift, Amazon OpenSearch Service, and Amazon Kinesis Data Analytics. The developer can implement Kinesis Data Firehose data transformation as an AWS Lambda function. The function can remove pattern-based customer identifiers from the data and return the modified data to Kinesis Data Firehose. The developer can set an Amazon S3 bucket as the destination of the delivery stream.
Question 70 Choose 1
A developer is designing an AWS Lambda function that creates temporary files that are less than 10 MB during invocation. The temporary files will be accessed and modified multiple times during invocation. The developer has no need to save or retrieve these files in the future. Where should the temporary files be stored?
Show answerHide answer

Correct answer: A the /tmp directory

Explanation

Explanation: AWS Lambda is a service that lets developers run code without provisioning or managing servers. Lambda provides a local file system that can be used to store temporary files during invocation. The local file system is mounted under the /tmp directory and has a limit of 512 MB. The temporary files are accessible only by the Lambda function that created them and are deleted after the function execution ends. The developer can store temporary files that are less than 10 MB in the /tmp directory and access and modify them multiple times during invocation.
Full mock exam

Sit the DVA-C02 exam before exam day

Full-length mocks with the same number of questions and the same time limit as the real DVA-C02 exam. Every attempt draws a new set of questions from the full bank, so you can keep going until you pass comfortably.

Get full DVA-C02 mock exam
  • 65questions per mock
  • 105 mintime limit
  • 368questions in the bank
  • Newmock on every attempt