Easy way to clear a AWS CloudFront distribution cache.
10K+
Easy way to clear a AWS CloudFront distribution cache.
When to use: after deploying and s3 static website.
| origin | tag | alias |
|---|---|---|
drentrega/aws-cli:latest | latest | - |
drentrega/aws-cli:amazonlinux | amazonlinux | - |
drentrega/aws-cli:1-amazonlinux | 1-amazonlinux | - |
drentrega/aws-cli:2-amazonlinux | 2-amazonlinux | - |
drentrega/aws-cli:jessie | jessie | - |
drentrega/aws-cli:stable-slim | stable-slim | - |
$ docker run --rm \
-v "${HOME}/.aws/credentials:/root/.aws/credentials" \
-e "PLUGIN_DISTRIBUTION=secret"
-e "PLUGIN_PATTERN=/*"
drentrega/drone-plugin-cloudfront-clear-cache:latest
Complete wipe out:
pipeline:
clear-cache:
image: drentrega/drone-plugin-cloudfront-clear-cache
secrets: ['aws_access_key_id', 'aws_secret_access_key']
distribution: 'your-cloudfront-distribution-id'
# or
pipeline:
clear-cache:
image: drentrega/drone-plugin-cloudfront-clear-cache
secrets: ['aws_access_key_id', 'aws_secret_access_key', 'aws_cloudfront_distribution_id']
Remove every single javascript file from cache with a pattern like /*.js:
pipeline:
clear-cache:
image: drentrega/drone-plugin-cloudfront-clear-cache
secrets: ['aws_access_key_id', 'aws_secret_access_key']
distribution: 'your-cloudfront-distribution-id'
pattern: '/*.js'
Remove style files with /*.css:
pipeline:
clear-cache:
image: drentrega/drone-plugin-cloudfront-clear-cache
secrets: ['aws_access_key_id', 'aws_secret_access_key']
distribution: 'your-cloudfront-distribution-id'
pattern: '/*.css'
Content type
Image
Digest
Size
81.4 MB
Last updated
over 7 years ago
docker pull drentrega/drone-plugin-cloudfront-clear-cache