We have a picture in an AWS S3 bucket which updated, but AWS CloudFront still returns its old version.
To remove it from the CloudFront cache – need to create an object’s invalidation.
It can be created via AWS Console web-UI or by using AWS CLI.
In the AWS Console – go to the desired distribution and click the Create invalidation button:
And set to clear everything under the
Or – create it using the AWS CLI:
Clean up process started:
By default – CloudFront will store objects in its cache during 24 hours, but this can be changed in the objects TTL settings: