Q37 — AWS SAA-C03 Ch.17
Question 37 of 89 | ← Chapter 17
Q1337. A company is creating a mobile financial app that gives users the ability to sign up and store personal information. The app uses an Amazon DynamoDB table to store user details and preferences. The app generates a credit score report by using the data that is stored in DynamoDB. The app sends credit score reports to users once every month.The company needs to provide users with an option to remove their data and preferences. The app must delete customer data within one month of receiving a request to delete the data. Which solution will meet these requirements with the LEAST operational overhead?
- A. Create an AWS Lambda function to delete user information. Create an Amazon EventBridge rule that runs when a specified TTL expires. Configure the EventBridge rule to invoke the Lambda function.
- B. Create a DynamoDB stream. Create an AWS Lambda function to delete user information. When a specified TTL expires, write user information to the DynamoDB stream from the DynamoDB table.Configure the DynamDB stream to invoke the Lambda function to delete user information.
- C. Enable TTL in DynamoDB. Set the expiration date as an attribute. Create an AWS Lambda function to set the TTL based on the expiration date value.Invoke the Lambda function when a user requests to delete personal data. ✓
- D. Enable TTL in DynamoDB. Create an AWS Lambda function to delete user information. Configure AWS Config to detect the DynamoDB stage change when TTL expires and to invoke the Lambda function.
Correct Answer: C. Enable TTL in DynamoDB. Set the expiration date as an attribute. Create an AWS Lambda function to set the TTL based on the expiration date value.Invoke the Lambda function when a user requests to delete personal data.
Explanation
A OR C.- Enabling DynamoDB TTL is the lowest-operational-overhead native mechanism to remove items after a specified expiration time. The app can set an expiration timestamp attribute (TTL) when a user requests deletion; DynamoDB automatically expires the item (typically within 48 hours of the timestamp, but you can set the timestamp so the actual removal occurs within the required one-month window).- Option C describes using a Lambda only to set the TTL attribute when the user requests deletion -- minimal extra infrastructure and code. No polling, no extra event orchestration, and DynamoDB handles the removal.Why the others are less suitable:- A: EventBridge does not natively trigger on DynamoDB TTL expirations; building a rule to run when TTL expires is not how TTL is surfaced and would require additional custom scheduling/management.- B: DynamoDB Streams do not emit events for TTL expirations (expired items are deleted asynchronously and do not appear in the stream), so this approach would not work reliably.- D: AWS Config does not detect TTL expirations on individual items and is not suitable for per-item deletion workflows; using Config would add unnecessary complexity.