How to clear Amazon CloudFront Cache completely?

后端 未结 3 2006
粉色の甜心
粉色の甜心 2021-01-07 19:54

I made some changes to my origin server which now serves different data from same url.

I tried to clear my cache completely by doing the following invalidation in CF

3条回答
  •  执笔经年
    2021-01-07 20:13

    You need to use /* instead of /.

    Also, if you need to do this frequently, you can do it using the AWS CLI.

    aws cloudfront create-invalidation --distribution-id=YOUR_DISTRIBUTION_ID --paths "/*"
    

    Edit: thanks to @speckledcarp, you need to use "/*" (with quotes) when using the CLI.

提交回复
热议问题