PracticeCF

DVA-C02 Question Bank · Latest 50 Questions Free Preview (Page 2/5)

Questions 11–20 of the latest 50 DVA-C02 questions (5 pages total), with answers and explanations, no login required. Practice all 1394 questions online.

Question 11 · No. 1355 · Single choice

A developer needs to automate deployments for a serverless, event-based workload. The developer needs to create standardized templates to define the infrastructure and to test the functionality of the workload locally before deployment The developer already uses a pipeline in AWS CodePipeline. The developer needs to incorporate any other infrastructure changes into the existing pipeline. Which solution will meet these requirements?

Answer: A

Explanation: The question specifies the need to automate deployments for a serverless, event-based workload and to create standardized templates for infrastructure. AWS Serverless Application Model (AWS SAM) is specifically designed for serverless applications and supports local testing of workloads via the AWS SAM CLI. Additionally, incorporating changes into an existing AWS CodePipeline aligns with Option A, as AWS SAM integrates seamlessly with CodePipeline to automate deployments. Options B and C involve tools not tailored for serverless workloads, and Option D bypasses the pipeline requirement by using an automated script.
Question 12 · No. 1356 · Single choice

A developer is creating an AWS Lambda function that needs network access to private resources in a VPC. Which solution will provide this access with the LEAST operational overhead?

Answer: A

Explanation: Attaching the Lambda function to the VPC through private subnets and using a security group is the simplest and most direct solution. It avoids the additional complexity and operational overhead of setting up a VPN, NAT gateway, or AWS PrivateLink. This approach ensures that the Lambda function can securely access private resources within the VPC without unnecessary infrastructure.
Question 13 · No. 1357 · Single choice

A developer has an application that runs in AWS Account A. The application must retrieve an AWS Secrets Manager secret that is encrypted by an AWS Key Management Service (AWS KMS) key from AWS Account B. The application’s role has permissions to access the secret in Account B. The developer must add a statement to the KMS key’s key policy to allow the role in Account A to use the KMS key in Account B. The permissions must grant least privilege access to the role. Which permissions will meet these requirements?

Answer: A

Explanation: The question requires granting the least privilege access to the role in Account A to use the KMS key in Account B. Since the application needs to retrieve a Secrets Manager secret encrypted by a KMS key, the necessary permissions are 'kms:Decrypt' (to decrypt the secret) and 'kms:DescribeKey' (to get details about the KMS key). The other options (B, C, D) either grant excessive permissions or do not directly align with the requirement to enable KMS-specific actions.
Question 14 · No. 1358 · Multiple choice

A development team is designing a mobile app that requires multi-factor authentication. Which steps should be taken to achieve this? (Choose two.)

Answer: A, C

Explanation: To implement multi-factor authentication for a mobile app, Amazon Cognito is the most suitable service because it provides user pool functionality and built-in support for MFA. Option A involves creating a user pool and managing users through Cognito, while option C ensures that MFA is enabled specifically for the user pool. Options B, D, and E either involve services not ideal for this use case (like SNS or IAM) or do not provide a direct method to accomplish MFA within the mobile app context.
Question 15 · No. 1359 · Single choice

A developer has implemented an AWS Lambda function that inserts new customers into an Amazon RDS database. The function is expected to run hundreds of times each hour. The function and RDS database are in the same VPC. The function is configured to use 512 MB of RAM and is based on the following pseudo code: <img src="https://img.examtopics.com/aws-certified-developer-associate-dva-c02/image38.png"> After successfully testing the function multiple times, the developer notices that the execution time is longer than expected. What should the developer do to improve performance?

Answer: C

Explanation: The Lambda function is creating a new database connection every time it runs, which is inefficient and can lead to longer execution times. Moving the database connection outside the handler to a global space ensures that the connection is reused across invocations, improving performance.
Question 16 · No. 1360 · Single choice

A developer is building the authentication mechanism for a new mobile app. Users need to be able to sign up, sign in, and access secured backend AWS resources. Which solution will meet these requirements?

Answer: D

Explanation: The question asks for a solution that allows users to sign up, sign in, and access secured backend AWS resources. Amazon Cognito User Pools are specifically designed for user authentication and management, providing features like sign-up/sign-in, password policies, MFA, and account recovery. This makes option D the best choice. Options A and B focus on IAM roles and policies but do not directly address user authentication. Option C (Identity Pool) is for federated identity access, but it does not handle the user sign-up and sign-in process as effectively as a User Pool.
Question 17 · No. 1361 · Single choice

A company wants to send notifications to customers to advertise a sale on the company’s products. The company needs to use Amazon Simple Notification Service (Amazon SNS) FIFO topics. The company needs to examine the rate at which the topics send notifications and the latency with which the topics send notifications. Which solution will meet these requirements with the MOST operational efficiency?

Answer: A

Explanation: The question asks for the most operationally efficient solution to monitor the rate and latency of Amazon SNS FIFO topics. AWS X-Ray is specifically designed for analyzing and tracing application performance, including services like Amazon SNS. By enabling active tracing for SNS, you can gain detailed insights into the notification delivery rate and latency effectively. Other options either don't provide the necessary granularity (e.g., CloudWatch metrics) or are not designed for this purpose (e.g., CloudTrail logs API calls but doesn’t measure performance, GuardDuty focuses on security).
Question 18 · No. 1362 · Single choice

A company stores customer credit reports in an Amazon S3 bucket. An analytics service uses standard Amazon S3 GET requests to access the reports. A developer must implement a solution to redact personally identifiable information (PII) from the reports before the reports reach the analytics service. Which solution will meet this requirement with the MOST operational efficiency?

Answer: B

Explanation: The requirement is to redact personally identifiable information (PII) from the reports before they reach the analytics service. The most operationally efficient solution is to use S3 Object Lambda, which allows you to process and transform data on the fly as it is being retrieved from S3. By attaching an S3 Object Lambda function to an S3 Object Lambda Access Point and programming the function to call a PII redaction API, the data can be dynamically redacted without requiring changes to the storage infrastructure or re-uploading objects. Solutions like Amazon Redshift (A), AWS KMS encryption (C), and Amazon SNS (D) either introduce unnecessary complexity or fail to address the need for dynamic PII redaction.
Question 19 · No. 1363 · Single choice

A developer is working on a project that requires regular updates to a web application’s backend code. The code is stored in AWS CodeCommit. Company policy states that all code must have complete unit testing and that the test results must be available for access. The developer needs to implement a solution that will take each change to the code repository, build the code, and run unit tests. The solution also must provide a detailed report of the test results. Which solution will meet these requirements?

Answer: C

Explanation: The question requires a solution that automates building the code, running unit tests, and generating detailed test reports. AWS CodeBuild is specifically designed for this purpose. It integrates seamlessly with AWS CodeCommit, can build the code, run unit tests, and generate detailed test reports using its built-in test reporting feature. Other options either misuse services (e.g., CodeDeploy is for deployment, not testing) or are impractical (e.g., Lambda functions are not ideal for this use case).
Question 20 · No. 1364 · Single choice

A cloud-based video surveillance company is developing an application that analyzes video files. After the application analyzes the files, the company can discard the files. The company stores the files in an Amazon S3 bucket. The files are 1 GB in size on average. No file is larger than 2 GB. An AWS Lambda function will run one time for each video file that is processed. The processing is very I/O intensive, and the application must read each file multiple times. Which solution will meet these requirements in the MOST performance-optimized way?

Answer: C

Explanation: The most performance-optimized solution is to increase the ephemeral storage size to 2 GB and copy the files from the S3 bucket to the /tmp directory of the Lambda function. This approach ensures that the I/O-intensive processing can be performed efficiently by leveraging local storage, which provides faster access compared to reading directly from S3 or attaching additional resources like EBS or ENA. Additionally, AWS Lambda supports increasing ephemeral storage up to 10 GB, so this is well within the limits.
Prev 12345 Next