gradle-aws-s3-sync
gradle-aws-s3-sync copied to clipboard
Option to Invalidate CloudFront Distribution
It would be nice to have an option (or additional task) to invalidate files in a CloudFront Distribution when the S3 origin is updated with the Sync task.
There is support for this in JetS3t: http://jets3t.s3.amazonaws.com/toolkit/code-samples.html#cloudfront-invalidation
I made a fork with a quick and dirty implementation of performing a CloudFront invalidation after sync completes. I couldn't work out how to get the results of the sync so you could invalidate changed paths or not invalidate at all if nothing has changed.
The commit is at https://github.com/NoxHarmonium/gradle-aws-s3-sync/commit/a6841f835890088755a996670003051f0eb444f9 if anyone is interested.
If you think it should be part of this repo I can clean it up and submit a PR.