Amazon iOS Mobile SDK v2 Create empty folder -


i have question related amazon ios mobile sdk v2. have task create empty folder inside provided bucket. create empty folder using method:

- (void)createdirectory:(awss3object *)directory inbucket:(awss3bucket *)bucket success:(void (^)())success failure:(void (^)(nserror *error))failure {     nsstring *configurationkey = [nsstring string];      if (self.configurationtype == amazonserviceconfigurationtypedefault)     {         configurationkey = s3configurationkey;     }      else if (self.configurationtype == amazonserviceconfigurationtypehub)     {         configurationkey = s3hubconfigurationkey;     }      else if (self.configurationtype == amazonserviceconfigurationtypetemporary)     {         configurationkey = s3temporaryconfigurationkey;     }      awss3 *s3 = [awss3 s3forkey:configurationkey];      awss3putobjectrequest *putobjectrequest = [awss3putobjectrequest new];      putobjectrequest.key = directory.key;     putobjectrequest.bucket = bucket.name;     putobjectrequest.body = [nsstring string];      [[s3 putobject:putobjectrequest] continuewithblock:^id(awstask *task)     {         if (task.error)         {             nserror *error = task.error;              failure(error);         }          else         {             success();         }          return nil;     }]; } 

with method getting error: the request signature calculated not match signature provided.

my access , secure keys correct.

from previous experience, used error because of incorrect parameters.

my key: aws ios sdk v2 test/test/

my bucket: abc-test

previously, when using aws ios mobile sdk v1, practically same code has been working charm.

does know, problem?

i able reproduce problem, cause of problem trailing slash of key value has been stripped nsurl.path ,lead incorrect request signature error. fix aws mobile sdk in future release. bringing our attention.


Comments