0
votes

While trying to upload image to amazon s3 using,

AWSS3TransferManager.defaultS3TransferManager().upload(uploadRequest).continueWithBlock{...}

Getting log in verbose mode,

AWSiOSSDKv2 [Debug] AWSURLResponseSerialization.m line:82 | [AWSJSONResponseSerializer responseObjectForResponse:originalRequest:currentRequest:data:error:] | Response header: [{ "Content-Length" = 129; "Content-Type" = "application/x-amz-json-1.1"; Date = "Sun, 30 Aug 2015 04:54:14 GMT"; nnCoection = close; "x-amzn-ErrorMessage" = "Access to Identity 'us-east-1:9b28176f-XXXX-XXXX-82d6-f64569ae14ce' is forbidden."; "x-amzn-ErrorType" = "NotAuthorizedException:"; "x-amzn-RequestId" = "2a1fc807-4ed3-11e5-a8b0-9368dcfb1138"; }]

I have confirmed bucket access policy to have proper access. What would be possible reason for such error?

1

1 Answers

0
votes

It appears your are trying to use an authenticated identity without setting valid tokens associated to that identity in credentials provider. You should be able to solve this by setting correct tokens before AWS service call.

A similar question is answered here. Check this out.