NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentPath = [paths objectAtIndex:0];
NSString *temp = [NSString stringWithFormat:@"%@/temp.txt", documentPath];
NSLog(temp);
// create our stream
NSOutputStream *outputStream =
[[NSOutputStream alloc] initToFileAtPath:temp append:YES];
[outputStream open];
// create our request
S3GetObjectRequest *getObjectRequest =
[[S3GetObjectRequest alloc] initWithKey:self.objectName
withBucket:self.bucket];
getObjectRequest.outputStream = outputStream;
// always make sure to close your streams when done
[outputStream close];