Feature Discussion: Invalidating Cloudfront paths
ColmHally opened this issue · comments
Would you be interested in a pull request that invalidated paths in an AWS Cloudfront Distribution depending upon their file.s3.state
value? i.e. we issue invalidation requests for files that have changed, been deleted or just created..
There are modules out there that invalidate objects in Cloudfront (https://github.com/pksunkara/gulp-cloudfront-invalidate and https://github.com/solarnz/gulp-invalidate-cloudfront) for example, but they require you to specify the items you want to invalidate (instead of making use of gulp's pipeline) and also, they don't have the added benefit of knowing what files have changed and hence, should be invalidated.
I'm cobbling together a solution to do this in my own Gulpfile.js
, but I think it would be a much better fit as part of this module. After all, the module is called gulp-awspublish
, not gulp-s3publish
so adding another AWS service integration here should not be outside the scope of the module 😃
What do you think?
I think it might be easier to break it down into a separate module and add a note in the readme
we can always merge it later on if we feel that it belong here
Ok - that's fair enough; I'll set about creating that module in the next couple of days. Thanks for the quick response.
@ColmHally could you find a way to do this using the gulp pipeline?
For those looking, https://github.com/lpender/gulp-cloudfront-invalidate-aws-publish