Created
August 3, 2014 23:48
-
-
Save ryanfitz/60bd921494461a25f5c0 to your computer and use it in GitHub Desktop.
list s3 buckets using the aws sdk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AWSS3.defaultS3().listBuckets(nil).continueWithBlock { | |
(task: BFTask!) -> AnyObject! in | |
let output : AWSS3ListBucketsOutput = task.result() as AWSS3ListBucketsOutput | |
println("found \(output.buckets.count) buckets") | |
for bucket in output.buckets as [AWSS3Bucket] { | |
println("Found bucket \(bucket.name)") | |
} | |
return nil | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment