{"action":"created","issue":{"url":"https://api.github.com/repos/aws/aws-sdk-ios/issues/621","repository_url":"https://api.github.com/repos/aws/aws-sdk-ios","labels_url":"https://api.github.com/repos/aws/aws-sdk-ios/issues/621/labels{/name}","comments_url":"https://api.github.com/repos/aws/aws-sdk-ios/issues/621/comments","events_url":"https://api.github.com/repos/aws/aws-sdk-ios/issues/621/events","html_url":"https://github.com/aws/aws-sdk-ios/issues/621","id":217018379,"number":621,"title":"com.amazonaws.AWSS3TransferUtilityErrorDomain Error Domain=com.amazonaws.AWSS3TransferUtilityErrorDomain Code=2","user":{"login":"dkavraal","id":4558966,"avatar_url":"https://avatars1.githubusercontent.com/u/4558966?v=4","gravatar_id":"","url":"https://api.github.com/users/dkavraal","html_url":"https://github.com/dkavraal","followers_url":"https://api.github.com/users/dkavraal/followers","following_url":"https://api.github.com/users/dkavraal/following{/other_user}","gists_url":"https://api.github.com/users/dkavraal/gists{/gist_id}","starred_url":"https://api.github.com/users/dkavraal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkavraal/subscriptions","organizations_url":"https://api.github.com/users/dkavraal/orgs","repos_url":"https://api.github.com/users/dkavraal/repos","events_url":"https://api.github.com/users/dkavraal/events{/privacy}","received_events_url":"https://api.github.com/users/dkavraal/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-03-26T01:21:42Z","updated_at":"2017-08-28T21:04:07Z","closed_at":"2017-03-26T02:32:50Z","body":"We have an S3 bucket in both in EUCentral1 and SAEast1 and can use download/upload tasks on ios client. (9.2 and 10.2.1)\r\n\r\nHowever, one particular test device (ios 9.2) is being denied 100% of her trials to upload a file to either of the storages.  The file upload task reports progress from 0% to 100% and as the last action expected to give the success message, instead here is the error message we get. (Other 5 real devices work ok, either 9.2 or 10.2.1, simulator 9.2 works ok)\r\n\r\n````\r\nError: com.amazonaws.AWSS3TransferUtilityErrorDomain Error \r\nDomain=com.amazonaws.AWSS3TransferUtilityErrorDomain \r\nCode=2 \r\n\"(null)\" \r\nUserInfo={Server=AmazonS3, \r\nTransfer-Encoding=Identity, \r\nConnection=close, \r\nContent-Type=application/xml, \r\nDate=Sun, 26 Mar 2017 00:53:24 GMT, \r\nx-amz-request-id=88220F9EB635AC88, \r\nx-amz-id-2=sNk62wUmnw0/xtURPcMEKtN4vMWghv8pveYWDhGOy7UM+uuXDSxP9dGkql5a+kOaDBgDyuFkED0=}\r\n````\r\n\r\nI have confirmed we can get keys from the developer custom authenticator and successfully pass to the ios AWS.\r\n\r\nInfo file has EUCentral1 configurations and AppDelegate has the below config:\r\n\r\n````swift\r\nlet devAuth = CustomProvider(regionType: .EUCentral1, identityPoolId: POOLID, useEnhancedFlow: true, identityProviderManager:nil);\r\nlet credentialsProvider = AWSCognitoCredentialsProvider(regionType: .EUCentral1, identityProvider:devAuth)\r\nlet configuration = AWSServiceConfiguration(region: .EUCentral1, credentialsProvider:credentialsProvider)\r\ncredentialsProvider.getIdentityId();\r\nAWSServiceManager.default().defaultServiceConfiguration = configuration\r\n````\r\n\r\n\r\n````swift\r\nPREFIX = \"https://s3.eu-central-1.amazonaws.com/\\(BUCKET)/\"\r\n// also, PREFIX = \"https://s3-ap-southeast-1.amazonaws.com/\\(BUCKET)/\"\r\nlet fileURL = URL(fileURLWithPath: localPath);\r\nlet transferUtility = AWSS3TransferUtility.default()\r\ntransferUtility.configuration.timeoutIntervalForRequest = 120\r\ntransferUtility.configuration.timeoutIntervalForResource = 7200\r\nlet expression = AWSS3TransferUtilityUploadExpression()\r\nfor metaKey in meta.keys {\r\n    expression.setValue(meta[metaKey], forRequestParameter: metaKey);\r\n}\r\nexpression.progressBlock = { (task:AWSS3TransferUtilityTask, progress:Progress) in\r\n        print(\"upload progress: \\(progress.fractionCompleted)\");\r\n    }\r\n}\r\n\r\nremoteURL = URL(string: remotePath, relativeTo: PREFIX);\r\ntransferUtility.uploadFile(fileURL,\r\n                        bucket: BUCKET,\r\n                        key: remotePath,\r\n                        contentType: \"audio/mp4\",\r\n                        expression: expression,\r\n                        completionHandler: self.completionHandler)\r\n    .continueWith(block: startHandler);\r\n````\r\n\r\n\r\nJust in case,\r\n````swift\r\n\r\nfinal class CustomProvider: AWSCognitoCredentialsProviderHelper {\r\n    \r\n    override func token() -> AWSTask<NSString> {\r\n        ...sth.sth... \r\n        self.identityId = keyId\r\n        return AWSTask(result: NSString(string:  keyToken));\r\n    }\r\n\r\n````\r\n\r\nLibrary ver:\r\n````\r\npod frameworks:\r\nUsing AWSCore (2.5.2)\r\nUsing AWSS3 (2.5.2)\r\n````"},"comment":{"url":"https://api.github.com/repos/aws/aws-sdk-ios/issues/comments/325481067","html_url":"https://github.com/aws/aws-sdk-ios/issues/621#issuecomment-325481067","issue_url":"https://api.github.com/repos/aws/aws-sdk-ios/issues/621","id":325481067,"user":{"login":"dkavraal","id":4558966,"avatar_url":"https://avatars1.githubusercontent.com/u/4558966?v=4","gravatar_id":"","url":"https://api.github.com/users/dkavraal","html_url":"https://github.com/dkavraal","followers_url":"https://api.github.com/users/dkavraal/followers","following_url":"https://api.github.com/users/dkavraal/following{/other_user}","gists_url":"https://api.github.com/users/dkavraal/gists{/gist_id}","starred_url":"https://api.github.com/users/dkavraal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkavraal/subscriptions","organizations_url":"https://api.github.com/users/dkavraal/orgs","repos_url":"https://api.github.com/users/dkavraal/repos","events_url":"https://api.github.com/users/dkavraal/events{/privacy}","received_events_url":"https://api.github.com/users/dkavraal/received_events","type":"User","site_admin":false},"created_at":"2017-08-28T21:04:07Z","updated_at":"2017-08-28T21:04:07Z","body":"Did you try to create temporary URL? That may work. In our case, we could not have created temporary URL due to large file uploadings (temp URLs have 60 minutes of life time)"}}
{"actor":{"display_login":"dkavraal"}}