0
votes

I'm able to upload files to a bucket in the Eastern region via the following configuration...

AWSCognitoCredentialsProvider *credentialsProvider = [AWSCognitoCredentialsProvider alloc initWithRegionType:AWSRegionUSEast1 identityPoolId:@"our pool ID"];

AWSServiceConfiguration *configuration = [AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:credentialsProvider;

AWSServiceManager defaultServiceManager.defaultServiceConfiguration = configuration;

However our dev and live buckets are in the western region. I understand that the Cognito provider is only available in the east but once authenticated we should be able to upload to a bucket in the west. I tried pointing the AWSServiceConfiguration to the west and tried to upload to the bucket name in the west. Upload succeeds but the the file is not in the bucket. Is it possible to upload to buckets in the west via Cognito?

1
It most definitely is possible to get logs on all S3 activity. docs.aws.amazon.com/AmazonS3/latest/UG/… - John Greenall
Thanks John! We now have logging enabled however no sign of the incoming request. We tried creating a new bucket in the Eastern Region (our dev bucket is in the west). We configured the AWSCognitoCredentialsProvider for the east and the AWSServiceConfiguration for east and we see the file in the new bucket. We need the files to go to a western bucket so I tried setting the AWSServiceConfiguration to the west but it does not work. Is it possible to upload to a western bucket via cognito? - imobilizer
Must understanding is that even though Cognito provider is only in the east we can upload to either east or west but not sure how? - imobilizer

1 Answers

0
votes

I solved it. When creating my instance of AWSS3TransferUtility I needed to specify the western region...

AWSS3TransferUtility *s3 = [AWSS3TransferUtility S3TransferUtilityForKey:USWest2S3TransferUtility];