Closed thomers closed 5 years ago
@minbi or @rohandubal , it's been a week - do you have any feedback regarding this issue?
@nikhil-dabhade , I guess this is related to https://github.com/aws-amplify/aws-sdk-ios/issues/1235
Hi @thomers, Apologies for the delayed response. Looks like this api call is failing with your current setup. Could you please provide us with the following info:
awsconfiguration.json
file to configure the SDK? This issue has been automatically closed because of inactivity. Please open a new issue if are still encountering problems.
State your question I'm having problems uploading a file from an iOS client via S3TransferUtility.
Context: I am upgrading from previous SDK versions, using a Mobile Hub generated setup of Cognito, S3 "User Files" (with private/protected/public/uploads structure), replacing the code from AWSUserFileManager with the new S3TransferUtility and the updated AWSMobileClient.
So, with the previous SDK 2.6.x setup, the upload for a logged in user has worked without problems !
The upload code (with the previous version commented out below).
"data" is an UIImage, "awsKey" is "protected/us-XXXX-X:XXXXXXXXX-XXXX-XXXXXX-XXX-XXXX/image.jpg" "contentType" is "image/jpeg"
This is called some time after the user has successfully logged in via AWSMobileClient.
As far as I can tell, the AWSS3TransferUtility has been initialized properly, with the correct region, and the AWSMobileClient as CredentialsProvider.
The "transferUtility uploadData" fails with this error:
I have checked the IAM roles, they have been unchanged from the previous working setup.
UPDATE: Some more logs:
Any pointers to where the problem lies?
Thanks, Thomas
Which AWS Services are you utilizing? Cognito S3 MobileClient
Provide code snippets (if applicable)
Environment:
Device Information (please complete the following information):