s3.listBuckets(AWSRequest.init()).continueWith(block: { (task) -> Any? in if let error = task.error { print("list bucket failed with error: (\(error))") } else { let buckets = task.result?.buckets print(buckets!) print("list bucket completed.") } return nil }) |