Hi all s3cmd fans!
The long requested *CloudFront invalidation* support is now available in
s3cmd-1.1.0-beta1 thanks to a sponsorship from Philipp Winkler and
Interactive 21 <http://interactive21.de>.
CF Invalidation is integrated with /s3cmd sync/ command:
~$ s3cmd *--cf-invalidate* --acl-public sync /local/path/
[... uploading ...]
Created invalidation request for 4 paths
Check progress with: s3cmd cfinvalinfo cf://E9RB4B71C06M7/IJK5N4YQBAG8K
It takes a couple of minutes for the invalidation requests to be
processed on the Amazon side. Can check the status with s3cmd cfinvalinfo:
~$ s3cmd *cfinvalinfo* cf://E9RB4B71C06M7/IJK5N4YQBAG8K
Nr of paths: 4
As there can be up to 3 invalidation requests running in parallel you
can list them all (using either s3://bucket or cf://dist-id identifier):
~$ s3cmd cfinvalinfo s3://public.example.com
Nr of paths: 4
Nr of paths: 20
There is also a couple of limitations:
- invalidation is only available for sync, there is no dedicated /s3cmd
cfinval/ command that would invalidate without uploading. Yet.
- the maximum number of paths invalidated in one run is 999 (that's a
single request size limit in Amazon). If more than 999 paths are to be
invalidated the list is saved in a file and the user will have to deal
with that in some other way, possibly using the future /s3cmd cfinval/
Download the package from this link:
For testing it is /not/ necessary to install s3cmd into the system.
Simply unpack it and run from that directory. For instance instead of
invoking the installed s3cmd run /tmp/s3cmd-1.1.0-beta1/s3cmd (if that's
where you unpacked the tarball).
S3cmd 1.1.0-beta1 should work as expected and there should be no
regressions against s3cmd 1.0.0 but please test it and let me know.