This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Invalidates objects on CloudFront triggered by S3 event | |
* Runtime: Node.js 6.10 | |
*/ | |
var aws = require('aws-sdk'); | |
var cloudfront = new aws.CloudFront(); | |
// returns if the Bucket is used in the Distribution | |
var bucketIsUsed = (distribution, bucketName) => { |