Blog Archive

Monday, 14 July 2008

Using Amazon S3 as storage for a web site

I used "s3cmd" under ubuntu to create a new bucket, then upload a jpeg to it:

Configure s3cmd to use your Amazon S3 account:
s3cmd --configure
Make a new bucket:<bucket>
s3cmd mb s3://
Upload a jpeg to the bucket:
s3cmd -P --mime-type=image/jpeg put picture.jpg s3://<bucket>
The URL for the file:
http://<bucket>.s3.amazonaws.com/picture.jpg