Skip to content

Invalidation using wildcard #21

Description

@chriseidhof

I got an email from Amazon:

Amazon CloudFront's invalidation feature, which allows you to remove an object from the CloudFront cache before it expires, now supports the * wildcard character. You can add a * wildcard character at the end of an invalidation path to remove all objects that match this path. In the past, when you wanted to invalidate multiple objects, you had to list every object path separately. Now, you can easily invalidate multiple objects using the * wildcard character.

Using the * wildcard character in the invalidation path is useful for many use cases. For example, if you're doing a new deployment, you can now just use /* to invalidate the entire distribution. Similarly, if you want to invalidate all objects for a specific end user, you can invalidate the content in a directory, for example, /enduser-x-data/*.

This new capability can also help you lower your cost of invalidating multiple objects. Invalidation paths that include the * wildcard (representing multiple objects) incur the same charge as an invalidation path that represents a single object. As before, the first 1,000 invalidation paths each month are provided at no additional charge and above this level, there is a $0.005 charge per invalidation path. But now you pay $0.005 for the /directory-name/* invalidation path even if this path matches thousands of objects. For more information on invalidation pricing, see Amazon CloudFront Pricing.

Maybe we should rework this to make sure we can invalidate with a wildcard (e.g. after an s3 sync?). I haven't tested this yet, though.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions