Amazon CloudFront introduces cache tag invalidation support

Amazon CloudFront now supports invalidation of cached objects by cache tag, enabling efficient content management across edge locations with a single request.

Amazon CloudFront has introduced a new feature that allows for the invalidation of cached objects by cache tag. This enhancement enables users to efficiently remove groups of related content from CloudFront edge locations with a single invalidation request. The new cache tag invalidation capability streamlines common operational tasks such as updating product information across multiple pages, managing legal takedown requests, addressing regulatory compliance needs, and refreshing content on multi-tenant platforms.

Previously, invalidating related objects that did not share a common URL path required tracking individual URLs or employing broad wildcard patterns, which could inadvertently clear unrelated content. With the introduction of invalidation by cache tag, developers and site reliability engineers can now tag cached objects by including a specified header with comma-separated tag values in HTTP responses. When necessary, they can invalidate all objects associated with a particular tag in a single request, thus maintaining high cache hit ratios while ensuring end users have access to the most up-to-date content within seconds.

The configuration of the header name can be managed through the Amazon CloudFront console, AWS CLI, or API, and multiple tags can be assigned to each object, allowing for flexible and precise cache management. Over the years, CloudFront has improved propagation times, with current invalidations taking effect in under 5 seconds at the 95th percentile (P95). The complete process, including the reporting of the invalidation status, is completed in under 25 seconds at P95.

The cache tag invalidation feature is available in all AWS Regions where CloudFront is offered, with the exception of China (Beijing, operated by Sinnet) and China (Ningxia, operated by NWCD). For more information, users can refer to the Invalidations By Cache Tag documentation. Each cache tag is priced as one path, and further details on pricing can be found on the CloudFront pricing page.