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"
More on DNS, CDN and Messaging
What are the Route 53 record types and why use Alias instead of CNAME?BeginnerDescribe Route 53 routing policies.IntermediateHow do Route 53 health checks and DNS failover work?AdvancedWhat is a Route 53 private hosted zone?IntermediateHow does DNS TTL relate to failover and migrations?BeginnerWhat are Route 53 Resolver endpoints and rules?Advanced