AWS Certified Solutions Architect – Professional — Question 702
A media company uses Amazon DynamoDB to store metadata for its catalog of movies that are available to stream. Each media item contains user-facing content that includes a description of the media, a list of searchable tags, and other similar data. In addition, media items include a list of Amazon S3 key names that relate to movie files. The company stores these movie files in a single S3 bucket that has versioning enabled. The company uses Amazon CloudFront to serve these movie files.
The company has 100,000 media items, and each media item can have many different S3 objects that represent different encodings of the same media. S3 objects that belong to the same media item are grouped together under the same key prefix, which is a random unique ID.
Because of an expiring contract with a media provider, the company must remove 2,000 media items. The company must completely delete all DynamoDB keys and movie files on Amazon S3 that are related to these media items within 36 hours. The company must ensure that the content cannot be recovered.
Which combination of actions will meet these requirements? (Choose two.)
Answer options
- A. Configure the DynamoDB table with a TTL field. Create and invoke an AWS Lambda function to perform a conditional update. Set the TTL field to the time of the contract's expiration on every affected media item.
- B. Configure an S3 Lifecycle object expiration rule that is based on the contract's expiration date.
- C. Write a script to perform a conditional delete on all the affected DynamoDB records.
- D. Temporarily suspend versioning on the S3 bucket. Create and invoke an AWS Lambda function that deletes affected objects. Reactivate versioning when the operation is complete.
- E. Write a script to delete objects from Amazon S3. Specify in each request a NoncurrentVersionExpiration property with a NoncurrentDays attribute set to 0.
Correct answer: B, C
Explanation
Using a script to perform conditional deletes on DynamoDB records (Option C) ensures immediate and reliable removal of metadata within the 36-hour constraint, whereas DynamoDB TTL (Option A) can take up to 48 hours to delete items. Configuring an S3 Lifecycle expiration rule (Option B) targeting the specific prefixes allows the automated and permanent deletion of both current and noncurrent versions of the objects in the versioned S3 bucket.