AWS DVA-C02 Free Practice Questions — Page 3

Developer Associate • 5 questions • Answers & explanations included

Question 11

A company is migrating legacy internal applications to AWS. Leadership wants to rewrite the internal employee directory to use native AWS services. A developer needs to create a solution for storing employee contact details and high-resolution photos for use with the new application. Which solution will enable the search and retrieval of each employee's individual details and high-resolution photos using AWS APIs?

A. Encode each employee's contact information and photos using Base64. Store the information in an Amazon DynamoDB table using a sort key.
B. Store each employee's contact information in an Amazon DynamoDB table along with the object keys for the photos stored in Amazon S3.
C. Use Amazon Cognito user pools to implement the employee directory in a fully managed software-as-a-service (SaaS) method.
D. Store employee contact information in an Amazon RDS DB instance with the photos stored in Amazon Elastic File System (Amazon EFS).
Show Answer & Explanation

Correct Answer: B. Store each employee's contact information in an Amazon DynamoDB table along with the object keys for the photos stored in Amazon S3.

The best architecture is to store structured contact information in DynamoDB while storing high-resolution photos in S3. DynamoDB is optimized for fast retrieval of structured data, while S3 is designed for object storage including large files like images. The DynamoDB record stores the S3 object key, allowing the application to retrieve the photo URL. Option A is problematic because DynamoDB has a 400KB item size limit, and Base64 encoding increases data size by 33%. Option C is for user authentication, not employee directories. Option D using RDS and EFS adds unnecessary complexity and cost.

Question 12

A developer is creating an application that will give users the ability to store photos from their cellphones in the cloud. The application needs to support tens of thousands of users. The application uses an Amazon API Gateway REST API that is integrated with AWS Lambda functions to process the photos. The application stores details about the photos in Amazon DynamoDB. Users need to create an account to access the application. In the application, users must be able to upload photos and retrieve previously uploaded photos. The photos will range in size from 300 KB to 5 MB. Which solution will meet these requirements with the LEAST operational overhead?

A. Use Amazon Cognito user pools to manage user accounts. Create an Amazon Cognito user pool authorizer in API Gateway to control access to the API. Use the Lambda function to store the photos and details in the DynamoDB table. Retrieve previously uploaded photos directly from the DynamoDB table.
B. Use Amazon Cognito user pools to manage user accounts. Create an Amazon Cognito user pool authorizer in API Gateway to control access to the API. Use the Lambda function to store the photos in Amazon S3. Store the object's S3 key as part of the photo details in the DynamoDB table. Retrieve previously uploaded photos by querying DynamoDB for the S3 key.
C. Create an IAM user for each user of the application during the sign-up process. Use IAM authentication to access the API Gateway API. Use the Lambda function to store the photos in Amazon S3. Store the object's S3 key as part of the photo details in the DynamoDB table. Retrieve previously uploaded photos by querying DynamoDB for the S3 key.
D. Create a users table in DynamoDB. Use the table to manage user accounts. Create a Lambda authorizer that validates user credentials against the users table. Integrate the Lambda authorizer with API Gateway to control access to the API. Use the Lambda function to store the photos in Amazon S3. Store the object's S3 key as par of the photo details in the DynamoDB table. Retrieve previously uploaded photos by querying DynamoDB for the S3 key.
Show Answer & Explanation

Correct Answer: B. Use Amazon Cognito user pools to manage user accounts. Create an Amazon Cognito user pool authorizer in API Gateway to control access to the API. Use the Lambda function to store the photos in Amazon S3. Store the object's S3 key as part of the photo details in the DynamoDB table. Retrieve previously uploaded photos by querying DynamoDB for the S3 key.

Amazon Cognito user pools provide a fully managed user authentication service with minimal operational overhead. For photo storage, S3 is the appropriate service as DynamoDB has a 400KB item size limit and is not designed for binary data. Option A is incorrect because storing photos in DynamoDB is inefficient and may exceed item size limits. Option C creating IAM users for each application user is an anti-pattern and not scalable for tens of thousands of users. Option D requires building custom authentication logic, increasing operational overhead compared to using Cognito.

Question 13

A company receives food orders from multiple partners. The company has a microservices application that uses Amazon API Gateway APIs with AWS Lambda integration. Each partner sends orders by calling a customized API that is exposed through API Gateway. The API call invokes a shared Lambda function to process the orders. Partners need to be notified after the Lambda function processes the orders. Each partner must receive updates for only the partner's own orders. The company wants to add new partners in the future with the fewest code changes possible. Which solution will meet these requirements in the MOST scalable way?

A. Create a different Amazon Simple Notification Service (Amazon SNS) topic for each partner. Configure the Lambda function to publish messages for each partner to the partner's SNS topic.
B. Create a different Lambda function for each partner. Configure the Lambda function to notify each partner's service endpoint directly.
C. Create an Amazon Simple Notification Service (Amazon SNS) topic. Configure the Lambda function to publish messages with specific attributes to the SNS topic. Subscribe each partner to the SNS topic. Apply the appropriate filter policy to the topic subscriptions.
D. Create one Amazon Simple Notification Service (Amazon SNS) topic. Subscribe all partners to the SNS topic.
Show Answer & Explanation

Correct Answer: C. Create an Amazon Simple Notification Service (Amazon SNS) topic. Configure the Lambda function to publish messages with specific attributes to the SNS topic. Subscribe each partner to the SNS topic. Apply the appropriate filter policy to the topic subscriptions.

Using a single SNS topic with message attributes and subscription filter policies is the most scalable approach. The Lambda function publishes all order notifications to one topic with partner-specific attributes. Each partner's subscription has a filter policy that ensures they only receive messages for their orders. Adding new partners requires only creating a new subscription with the appropriate filter policy - no code changes needed. Option A requires code changes for each new partner. Option B is not scalable and requires multiple functions. Option D sends all messages to all partners without filtering.

Question 14

A financial company must store original customer records for 10 years for legal reasons. A complete record contains personally identifiable information (PII). According to local regulations, PII is available to only certain people in the company and must not be shared with third parties. The company needs to make the records available to third-party organizations for statistical analysis without sharing the PII. A developer wants to store the original immutable record in Amazon S3. Depending on who accesses the S3 document, the document should be returned as is or with all the PII removed. The developer has written an AWS Lambda function to remove the PII from the document. The function is named removePii. What should the developer do so that the company can meet the PII requirements while maintaining only one copy of the document?

A. Set up an S3 event notification that invokes the removePii function when an S3 GET request is made. Call Amazon S3 by using a GET request to access the object without PII.
B. Set up an S3 event notification that invokes the removePii function when an S3 PUT request is made. Call Amazon S3 by using a PUT request to access the object without PII.
C. Create an S3 Object Lambda access point from the S3 console. Select the removePii function. Use S3 Access Points to access the object without PII.
D. Create an S3 access point from the S3 console. Use the access point name to call the GetObjectLegalHold S3 API function. Pass in the removePii function name to access the object without PII
Show Answer & Explanation

Correct Answer: C. Create an S3 Object Lambda access point from the S3 console. Select the removePii function. Use S3 Access Points to access the object without PII.

S3 Object Lambda allows you to add your own code to process data retrieved from S3 before returning it to an application. By creating an S3 Object Lambda access point and configuring it with the removePii Lambda function, third-party users accessing through this access point will receive documents with PII removed, while internal users can access the original through the standard access point. This maintains a single copy of the document while serving different views based on access method. S3 event notifications (Options A and B) don't work for GET operations and can't modify returned data.

Question 15

A developer is deploying an AWS Lambda function The developer wants the ability to return to older versions of the function quickly and seamlessly. How can the developer achieve this goal with the LEAST operational overhead?

A. Use AWS OpsWorks to perform blue/green deployments.
B. Use a function alias with different versions.
C. Maintain deployment packages for older versions in Amazon S3.
D. Use AWS CodePipeline for deployments and rollbacks.
Show Answer & Explanation

Correct Answer: B. Use a function alias with different versions.

Lambda function aliases combined with versioning provide the simplest way to manage and roll back Lambda deployments. Each deployment can be published as a new version, and an alias (like 'prod' or 'live') can point to any version. Rolling back is as simple as updating the alias to point to a previous version - this is instantaneous and requires no redeployment. OpsWorks and CodePipeline add unnecessary complexity for this use case. Maintaining packages in S3 requires manual redeployment for rollbacks, increasing operational overhead.

Ready for the Full DVA-C02 Experience?

Access all 112 pages of practice questions, track your progress, and simulate the real exam with timed mode.

Start Interactive Quiz →

Recommended Next Certifications

After DVA-C02, consider these certification paths:

DOP-C02 — DevOps Engineer Professional SAA-C03 — Solutions Architect Associate