-
Notifications
You must be signed in to change notification settings - Fork 65
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
AWS S3 access denied error when trying to push a build to S3 #76
Comments
this is also happening to me: Here's my action
I've triple checked all those environment variables and can upload files directly with the same credentials, not sure where to go now. |
solved my issue, I had to specify a less public acl based on the custom default acl our bucket had. For me it was the following in my action in the fastfile: |
There would appear to be a similar issue for an S3 bucket for which ACLs are disabled. If that's the case, then no object-level ACLs are allowed to be applied. Looking at the code, an ACL argument would always appear to be included in the functions that write the objects: def self.upload_file(s3_client, bucket_name, app_directory, file_name, file_data, acl, server_side_encryption, download_endpoint, download_endpoint_replacement_regex)
if app_directory
file_name = "#{app_directory}/#{file_name}"
end
bucket = Aws::S3::Bucket.new(bucket_name, client: s3_client)
details = {
acl: acl,
key: file_name,
body: file_data,
content_type: MIME::Types.type_for(File.extname(file_name)).first.to_s
}
details = details.merge(server_side_encryption: server_side_encryption) if server_side_encryption.length > 0
obj = bucket.put_object(details) And the
I'd argue something in this plugin code needs to change to reflect the current "default" of S3 bucket ACL configuration. I probably wouldn't go so far as to just alter the default to be |
Hi,
Thank you for creating and maintaining this plugin.
I've managed to get this plugin working using my personal AWS credentials to get an iOS app build uploaded to S3.
We're working on getting this setup in CI (Circle) and would like to create a dedicated IAM user for use in CI with the bare minimum AWS permissions to allow builds to be uploaded to S3. Before we get this into CI, I am testing with the credentials on my machine, so any CI related factors are not at play here.
I am running into
Aws::S3::Errors::AccessDenied: [!] Access Denied
error after a few attempts trying to set the right permissions on the new IAM account. Wanted to share what I have and try to get help from the community on S3 permissions that work.We have a bucket dedicated to builds, let's call it
bucket-name
and the permissions I've tried are as follows, based on this S3 help doc:I was still getting the access denied error and so I expanded the permissions to allow the client to be able to list buckets (as per AWS docs):
But I am still getting the same error:
Any help would be much appreciated!
Environment:
The text was updated successfully, but these errors were encountered: