Invalidate the content in CloudFront to force the removal of objects
Select your distribution and go to Invalidations tab. Create an invalidation request.

At the Create invalidation page:
/test.html
/cf-test-image.png

Now let’s update the HTML page in the S3 bucket. We are going to update the test html version to 4. Save the file locally and then upload to your S3 bucket.




To summarize, content updates are now reflected immediately on S3 and the CDN every 20 seconds, rather than every 24 hours.