diff --git a/packages/server/src/api/controllers/deploy/aws.js b/packages/server/src/api/controllers/deploy/aws.js index 1337f23d1c..28bedb8893 100644 --- a/packages/server/src/api/controllers/deploy/aws.js +++ b/packages/server/src/api/controllers/deploy/aws.js @@ -2,6 +2,7 @@ const fs = require("fs") const { join } = require("../../../utilities/centralPath") const AWS = require("aws-sdk") const fetch = require("node-fetch") +const uuid = require("uuid") const { budibaseAppsDir } = require("../../../utilities/budibaseDir") const PouchDB = require("../../../db") const environment = require("../../../environment") @@ -13,7 +14,7 @@ async function invalidateCDN(cfDistribution, appId) { .createInvalidation({ DistributionId: cfDistribution, InvalidationBatch: { - CallerReference: appId, + CallerReference: `${appId}-${uuid.v4()}`, Paths: { Quantity: 1, Items: [`/assets/${appId}/*`],