AWS CloudFront cache invalidating grunt task.
Grunt task for invalidating cache on Amazon AWS CloudFront with the official AWS SDK for node.js.
Install this grunt plugin next to your project's grunt.js gruntfile with:
npm install grunt-cloudfront --save-dev
Then add this line to your project's
// Project configuration.grunt;
awsProfile parameter is supplied, the aws-sdk will read credentials from that profile and use them for your invalidation job. If no awsProfile is supplied, credentials will be loaded from the following environment variables if available:
You can also store them in a git ignored credential file and pass them as options to the grunt job:
Then in the job options: