I am using s3 bucket as origin in cloudfront to cache and host my reactjs website.
After every deployment on s3 i want to invalidate the cache of my cloudfront distribution so that the user can get the latest build deployed..
Moreover, while reading the pricing of cloudfront invalidation, i want to make sure i don't exceed the free tier which is 1000 paths per month. Plus we don't have more then 10 or 20 deployments to production in a month.. and each deployment has around 500 files in directories:
So my question is: if i use "/*"
as a invalidation query would it be considered as a 1 path ? or it would be 500 paths ?
I think the answer is the same link you provided in your question. Your question is whether wildcard is considered as 1 path or multiple part, so here is the screenshot for the same :
EDIT : For your confirmation, you can find the number of invalidations for a period of time by filtering the "Cost & Usage Report" (AWS console) by service="CloudFront" and usageType="Invalidations".
Hope this answers your question. Feel free to comment for any question.