CreateInvalidation
Source:
src/AWS/CloudFront/CreateInvalidation.ts
Grants a Function permission to create CloudFront cache invalidations for a distribution at runtime — the classic post-publish/CMS purge pattern.
Invalidating from a Function
Section titled “Invalidating from a Function”const invalidate = yield* CloudFront.CreateInvalidation(distribution);
const response = yield* invalidate({ InvalidationBatch: { CallerReference: crypto.randomUUID(), Paths: { Quantity: 1, Items: ["/blog/*"] }, },});// response.Invalidation?.Id