
Ultimate access to all questions.
Deep dive into the quiz with AI chat providers.
We prepare a focused prompt with your quiz and certificate details so each AI can offer a more tailored, in-depth explanation.
A company has a static website that is hosted on Amazon CloudFront in front of Amazon S3. The static website uses a database backend. The company notices that the website does not reflect updates that have been made in the website's Git repository. The company checks the continuous integration and continuous delivery (CI/CD) pipeline between the Git repository and Amazon S3. The company verifies that the webhooks are configured properly and that the CI/CD pipeline is sending messages that indicate successful deployments.
A solutions architect needs to implement a solution that displays the updates on the website.
Which solution will meet these requirements?
A
Add an Application Load Balancer.
B
Add Amazon ElastiCache for Redis or Memcached to the database layer of the web application.
C
Invalidate the CloudFront cache.
D
Use AWS Certificate Manager (ACM) to validate the website's SSL certificate.
Explanation:
The correct answer is C. Invalidate the CloudFront cache.
CloudFront caching behavior: When CloudFront is configured in front of an S3 bucket hosting a static website, it caches content at edge locations to improve performance and reduce latency. This means that even when the source files in S3 are updated, CloudFront may continue to serve the cached (old) versions to users.
The problem described: The CI/CD pipeline is successfully deploying updates to S3 (confirmed by successful deployment messages), but users are not seeing the updates on the website. This is a classic CloudFront caching issue.
Cache invalidation solution: To force CloudFront to fetch fresh content from the origin (S3), you need to invalidate the cache. This can be done by:
/*) to invalidate all contentA. Add an Application Load Balancer: This would not solve the caching issue. ALB is for distributing traffic to multiple targets, not for cache management.
B. Add Amazon ElastiCache for Redis or Memcached: This is for database caching, not for static website content caching. The problem is with CloudFront's edge caching, not database performance.
D. Use AWS Certificate Manager (ACM) to validate the website's SSL certificate: SSL certificate validation is unrelated to content updates and caching issues.