Trying to upload image to Amazon S3 with public read permission.
UPLOAD DENIED:
with ACL 'PublicReadWrite'
_uploadRequest.ACL = AWSS3BucketCannedACLPublicReadWrite
UPLOAD SUCCESS:
with ACL 'Private'
_uploadRequest.ACL = AWSS3BucketCannedACLPrivate
any solution? direction?
MY CODE:
1. SET CERDITIALS
AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc]
initWithRegionType:_regionType
identityPoolId:_pool_id];
2. CONFIGURATION
AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc]initWithRegion:_regionType credentialsProvider:credentialsProvider];
AWSServiceManager.defaultServiceManager.defaultServiceConfiguration = configuration;
3. CREATE UPLOAD REQUEST
_uploadRequest = [AWSS3TransferManagerUploadRequest new];
_uploadRequest.ACL = AWSS3BucketCannedACLPublicReadWrite;
4. START Transfer MANAGER
AWSS3TransferManager * transferManager = [AWSS3TransferManager defaultS3TransferManager];
[[transferManager upload:_uploadRequest] continueWithExecutor:[AWSExecutor mainThreadExecutor] withBlock:^id(AWSTask * task) {
return nil;
}];
bucket permissions are Read/Write ( for all users)
BUCKET POLICY:
{
"Version": "2012-10-17",
"Id": "Policy14...5",
"Statement": [
{
"Sid": "Stmt14.....5",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
"Action": "s3:*",
"Resource": "arn:aws:s3:::myBucket/UsersUploads"
}
]
}

*characters were interpreted as markdown. To prevent this in the future, you can surround short blocks of code or other literals with`backticks in comments (or the body). Adding to the question with an edit is even better, so thank you for that. - Michael - sqlbot