I’m working on CI/CD pipeline for a set of static assets, and am getting pretty close, but I’m running into an issue with awscli that I’m a bit lost on:
I’m using the AWS CLI to sync my built changes with a specific S3 bucket (which is cached+served via CloudFront), and am then attempting to create a CF invalidation so that the latest version is made available immediately.
When I attempt to run the following:
aws cloudfront create-invalidation --distribution-id <MY_DIST_ID> --paths <PATHS_TO_INVALIDATE>
I get the following error:
aws: error: the following arguments are required: --invalidation-batch
Per the Cloudfront CLI docs,
paths should be acceptable. After some largely unsuccessful internet sleuthing, I stumbled upon this Github comment that suggests to me that I’m running an out-of-date version of the
This hunch is further compounded by the fact that the CLI warns me that the cloudfront tool is a preview only tool, and requires me to set
preview.cloudfront true to use.
Is the Docker image I’m using (circleci/node:6.10-browsers) out of date? Even an
apt-get update didn’t seem to resolve this, so I’m out of ideas. Any help would be greatly appreciated.