s3cmd, Pelican, and You

Posted on Sun 11 September 2011 in Development

Turns out uploading this blog to Amazon S3 using s3cmd is ridiculously simple. All I have to do to sync the Pelican generated directory to my S3 bucket is the follwing:

s3cmd sync --acl-public --delete-removed output/ s3://www.bensnider.com/

The sync command basically works like rsync; it uses the hashing and diffing features in S3 to upload only the contents that have changed. I also specify the --acl-public option to have the files uploaded be HTTP readable by everyone.

If you don't feel like jumping in with both feet yet, you can use the rsync-alike --dry-run option until you are satisfied with the operations.

Handy!