title: aws s3 sdk for iOS putObjectRegquest to "new" region not working
body: <p>first let me say that I am new ios/xcode as well as AWS. </p>
  
  <p>I am creating an app that writes data to an AWS S3 bucket. The app works when creating a bucket and putting objects to the US Standard Region. However, when I change the region to Singapore, the app creates the bucket successfully - but, I cannot put objects into the bucket and AWS does not produce an error or exception of any kind.</p>
  
  <p>Here is the code in question. The commented code in the createBucket method successfully creates a bucket in Singapore. The processGrandCentralDispatchUpload method is works for the US Standard region, but does not put objects to my Singapore bucket.</p>
  
  <pre><code>- (void)createBucket
  {
  // Create the bucket.
  @try {
  
      //S3Region *region = [[S3Region alloc] initWithStringValue:kS3RegionAPSoutheast1];
      //S3CreateBucketRequest *createBucketRequest = [[S3CreateBucketRequest alloc] initWithName:[Constants S3Bucket] andRegion:region];
  
      S3CreateBucketRequest *createBucketRequest = [[S3CreateBucketRequest alloc] initWithName:[Constants S3Bucket]];
      S3CreateBucketResponse *createBucketResponse = [self.s3 createBucket:createBucketRequest];
  
      NSLog(@"create bucket response: %@", createBucketResponse.error);
  
      if(createBucketResponse.error != nil)
      {
          NSLog(@"Error: %@", createBucketResponse.error);
      }
  }
  
  @catch (AmazonServiceException* asex) {
      NSLog(@"putObject - AmazonServiceException - %@", asex);
  }
  
  @catch (AmazonClientException* acex) {
      NSLog(@"putObject - AmazonClientException - %@", acex);
  }
  </code></pre>
  
  <p>}</p>
  
  <pre><code>- (void)processGrandCentralDispatchUpload:(NSData *)jsonData withTimestamp:(int)timestamp
  </code></pre>
  
  <p>{</p>
  
  <pre><code>dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
  dispatch_async(queue, ^{
  
      UserData * user = [[[DataStore defaultStore] user] objectAtIndex:0];
  
      NSString * dateKeyComponent = [self putRequestDateComponent:timestamp];
  
      objectName = [NSString stringWithFormat:@"%@/%@/%@", user.email, user.uniqueIdentifier, dateKeyComponent];
  
      S3PutObjectRequest *putObjectRequest = [[S3PutObjectRequest alloc] initWithKey:objectName
                                                               inBucket:[Constants S3Bucket]];
      putObjectRequest.contentType = @"data/json";
      putObjectRequest.data = jsonData;
  
      // Put the image data into the specified s3 bucket and object.
  
      @try {
          S3PutObjectResponse *putObjectResponse = [self.s3 putObject:putObjectRequest];
  
          dispatch_async(dispatch_get_main_queue(), ^{
  
              if(putObjectResponse.error != nil)
              {
                  NSLog(@"Error: %@", putObjectResponse.error);
                  [self showAlertMessage:[putObjectResponse.error.userInfo objectForKey:@"message"] withTitle:@"Upload Error"];
              }
              else
              {
                  //[self showAlertMessage:@"The data was successfully uploaded." withTitle:@"Upload Completed"];
              }
  
              [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO];
          });
      }
  
      @catch (AmazonServiceException* asex) {
          NSLog(@"putObject - AmazonServiceException - %@", asex);
      }
  
      @catch (AmazonClientException* acex) {
          NSLog(@"putObject - AmazonClientException - %@", acex);
      }
  
  });
  </code></pre>
  
  <p>}</p>