AWS Certified Solutions Architect – Associate (SAA-C02) — Question 594

A company is hosting its website on Amazon S3 and is using Amazon CloudFront to cache content. The company has an upcoming product launch. An employee accidentally published marketing content to the website before the official release of the product. The company needs to remove the marketing content from the website as quickly as possible.
Which solution will meet these requirements?

Answer options

Correct answer: B

Explanation

Deleting the object from the source Amazon S3 bucket ensures that it cannot be retrieved again, while executing a CloudFront invalidation immediately removes the cached version of the files from all edge locations. Other methods, such as updating cache policies to lower TTLs, only apply to future requests and will not immediately purge already cached content. Modifying the S3 bucket policy or changing the origin does not resolve the issue quickly because CloudFront will continue to serve the cached, leaked content from its edge caches until the TTL expires.