aws (command line tool)
To install to the
bin directory in your home directory:
$ curl timkay.com/aws/aws -o ~/bin/aws $ chmod +x ~/bin/aws
If you have an appropriate
/etc/mime.types file the
aws tool will automatically set the correct
Content-Type for you based on the file extension. I have a very brief MIME types file that covers the basic file types that I expect to be distributing using Amazon S3:
application/octet-stream bin dmg img iso pkg application/ogg ogg application/pdf pdf application/x-bzip2 bz2 application/x-gzip gz tgz application/x-tar tar application/zip zip audio/mpeg mp3 image/gif gif image/jpeg jpeg image/png png text/plain txt video/mpeg mpeg mpg video/quicktime mov
"Objects" uploaded into the bucket (really files) are identified by textual keys. Keys can have path-like names to give the appearance of hierarchical organization, but in reality buckets are just shallow/flat collections. This means that the following "paths" all refer to objects in the "top" (and only) level in the bucket:
As an example, to upload
synergy-4.4.zip into the appropriate bucket:
$ aws put s3.wincent.com/synergy/releases/synergy-4.4.zip /local/path/to/Synergy4.4.zip $ aws put s3.wincent.com/synergy/releases/synergy-4.4.zip?acl --public
The second line is necessary to override the default ACL (which only allows the owner access to the object but nobody else).
Add a comment
Comments are now closed for this article.