Aws-sdk-ios: Settings public-read ACL on AWSS3TransferUtilityUploadExpression does not work

Created on 1 Nov 2016  路  2Comments  路  Source: aws-amplify/aws-sdk-ios

So, I'm uploading ok with the AWSS3TransferUtility.default(), however, I need to set the ACL to public read. I'm trying:

        let expression = AWSS3TransferUtilityUploadExpression()
        expression.setValue("public-read", forRequestHeader: "x-amz-acl")

Then passing this to the AWSS3TransferUtility.default().uploadData(

However, it does not seem to work.

Most helpful comment

Ok turns out I need to add an IAM policy to my cognate auth role, putObjectACL allow.

All 2 comments

Ok turns out I need to add an IAM policy to my cognate auth role, putObjectACL allow.

@helloniklas, sorry I'm pretty new to the AWS world. Can you explain how you achieved this?

Was this page helpful?
0 / 5 - 0 ratings