-
Notifications
You must be signed in to change notification settings - Fork 877
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When using us-west-2 the object upload fails for my S3 bucket. #5290
Comments
@greater-c Thanks for submitting the issue. We'll investigate the issue and provide updates here. |
@greater-c Can you provide the code that demonstrates how you're upload to S3 for reference and help us reproduce your issue. |
@greater-c Can you also verify if you have the file |
I have not created that file, is it not in use and it's not in my Xcode project. |
I've provided the code. It failed to upload files until I created a bucket in the us-east-1 region and set it as the upload target. |
@greater-c I was able to upload to let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USWest1, identityPoolId: "us-west-1:xxxx-xxx-xxxx")
let configuration = AWSServiceConfiguration(region: .USWest1, credentialsProvider: credentialProvider)
AWSServiceManager.default().defaultServiceConfiguration = configuration
let transferUtility = AWSS3TransferUtility.default() Here are couple things to try to debug further on why it's not working for you:
transferUtility.uploadData(data,
bucket: "testbucket",
key: "testkey",
contentType: "application/octet-stream",
expression: nil,
completionHandler: { (task, error) in
if let error = error {
print("*** Error: \(error.localizedDescription)")
}
}) |
The SDK automatically signs server requests with the us-east-1 region for some reason. I've been dealing with this issue for days and needed server logs to discover this.
Code:
func uploadMP4ToS3(filePath: URL, key: String) {
let credentialsProvider = AWSCognitoCredentialsProvider(regionType: .USWest2, identityPoolId: "US-WEST-2 IDENTITY_POOL_ID")
// Set up the service configuration
let configuration = AWSServiceConfiguration(region: .USWest2, credentialsProvider: credentialsProvider)
The text was updated successfully, but these errors were encountered: