One of the cooler packages in the public store repository is Cloudfork - to get it, just load "Cloudfork-all" into VisualWorks or ObjectStudio. from there, and then you can access whatever cloud services you use on Amazon. You'll need key info (you get that from Amazon), and you'll need something actually stored there. From there:
credentials := CFAWSCredentials newWith: key andSecret: secret.
s3 := CFSimpleStorageService newWith: credentials.
Now that you have your credentials lined up, you can query the buckets you have on S3:
buckets := (s3 allBuckets) result.
buckets do: [:each |
Transcript show: 'Bucket: <', each name, '>'.
Now open up a bucket and see what's inside it:
"open a bucket"
bucket := s3 openBucketNamed: 'jar-images'.
all := bucket getList result.
Finally, now get an item and have a look at it. In my case, it's a JPEG:
"now extract first item"
key := all first key.
byteArray := (bucket getObject: key) result.
"save to a file"
file := 'imgFroms3.jpg' asFilename writeStream.
file nextPutAll: byteArray.
"now open it"
img := (ImageReader fromFile: 'imgFroms3.jpg') image.
And that's it. I did a screencast on this awhile back as well:
cloud, amazon, s3, smalltalk