I'm uploading files to an S3 bucket using a method based on the AWS example code here:
http://docs.aws.amazon.com/mobile/sdkforios/developerguide/s3transfermanager.html
The problem is, once those files are uploaded, the default permission to view those files is only given to the owner of the S3 bucket, and I would like them to be publicly available. How can I achieve this using the iOS SDK 2.0?
The "403 Forbidden" error can occur due to the following reasons: Permissions are missing for s3:PutObject to add an object or s3:PutObjectAcl to modify the object's ACL. You don't have permission to use an AWS Key Management Service (AWS KMS) key. There is an explicit deny statement in the bucket policy.
If you're getting Access Denied errors on public read requests that are allowed, check the bucket's Amazon S3 Block Public Access settings. Review the S3 Block Public Access settings at both the account and bucket level. These settings can override permissions that allow public read access.
You can assign AWSS3ObjectCannedACLPublicRead
to the ACL
property on your AWSS3PutObjectRequest
object.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With