Interview Prep/AWS/DNS, CDN and Messaging

Cache invalidation vs versioned object names?

BeginnerConceptDNS, CDN and Messaging
Answer

An invalidation removes objects from edge caches by path (the first 1,000 paths per month are free, then charged), takes seconds to minutes, and /* is allowed. Versioned names (app.3f9a1c.js) make each release a new URL, so no invalidation is needed and old caches are harmless.

Best practice: long TTLs with hashed asset names, and a short TTL or invalidation only for index.html.

aws cloudfront create-invalidation --distribution-id E123 --paths "/index.html"
aws All AWS questions Roadmap: AWS core services

More on DNS, CDN and Messaging