Skip to content

Reduce redundant CloudFront invalidation paths#309

Open
carlospolop wants to merge 1 commit into
masterfrom
hermes/reduce-cloudfront-invalidation-paths
Open

Reduce redundant CloudFront invalidation paths#309
carlospolop wants to merge 1 commit into
masterfrom
hermes/reduce-cloudfront-invalidation-paths

Conversation

@carlospolop

Copy link
Copy Markdown
Collaborator

Created by Hermes.

Problem

CloudFront invalidations are the top wiki-account cost driver. In the last 15 days, the cloud HackTricks distribution invalidated 375 paths across 171 batches, including repeated explicit /en/sitemap.xml and translated /<lang>/sitemap.xml paths.

Change

  • Keep invalidating /<lang>/* and /en/*.
  • Remove redundant explicit /<lang>/sitemap.xml, /en/sitemap.xml, and /en/robots.txt paths because they are already covered by the wildcard invalidation.
  • Continue invalidating root /sitemap.xml and /robots.txt where needed.

Safety

CloudFront wildcard invalidation paths cover all objects below the prefix, so this preserves cache refresh behavior while reducing billable invalidation paths.

Validation

  • Parsed modified workflow YAML with PyYAML successfully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants