Force CloudFront distribution/file update

后端 未结 13 1196
失恋的感觉
失恋的感觉 2020-12-07 07:01

I\'m using Amazon\'s CloudFront to serve static files of my web apps.

Is there no way to tell a cloudfront distribution that it needs to refresh it\'s file or point

相关标签:
13条回答
  • 2020-12-07 07:56

    If you have boto installed (which is not just for python, but also installs a bunch of useful command line utilities), it offers a command line util specifically called cfadmin or 'cloud front admin' which offers the following functionality:

    Usage: cfadmin [command]
    cmd - Print help message, optionally about a specific function
    help - Print help message, optionally about a specific function
    invalidate - Create a cloudfront invalidation request
    ls - List all distributions and streaming distributions
    

    You invaliate things by running:

    $sam# cfadmin invalidate <distribution> <path>
    
    0 讨论(0)
提交回复
热议问题