Skip to content

Instantly share code, notes, and snippets.

@brianleroux
Created September 21, 2024 13:20
Show Gist options
  • Save brianleroux/03743404802086f2300261de8458711d to your computer and use it in GitHub Desktop.
Save brianleroux/03743404802086f2300261de8458711d to your computer and use it in GitHub Desktop.
Invalidate a CloudFront CDN distribution cache
import awsLite from '@aws-lite/client'
const aws = await awsLite()
await aws.CloudFront.CreateInvalidation({
CallerReference: Date.now()+'',
Id: 'xxx',
InvalidationBatch: '/*',
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment