question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

S3 unhelpful error "Access Denied" when using ACL: 'public-read'

See original GitHub issue

Describe the bug Setting ACL: 'public-read' when the bucket has “Block” permissions gives unhelpful error of “Access Denied”.

Is the issue in the browser/Node.js? Node.js

If on Node.js, are you running this on AWS Lambda? No.

To Reproduce (observed behavior) Set the bucket permissions so it has “Block All”

var uploadParams = {Bucket: 'example-bucket', Key: '/test', Body: '', ACL: 'public-read'};
var putObjectPromise = await s3.upload(uploadParams).promise();

Expected behavior The error message should provide a more helpful / relevant message such as “Invalid Parameters” or “Incompatible Parameters”.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
CyberCyclonecommented, Jan 21, 2020

Specifically, “ACL is not compatible with the buckets policy” would have helped me for this specific situation.

If the “Access Denied” error is thrown for any invalid params, then wouldn’t “Param Conflict” still be relevant as it would only be thrown when a param has a conflict with the bucket?

I haven’t looked specifically for where it’s throwing the error message so I’m not sure on it’s context.

0reactions
github-actions[bot]commented, Jan 24, 2021

Greetings! We’re closing this issue because it has been open a long time and hasn’t been updated in a while and may not be getting the attention it deserves. We encourage you to check if this is still an issue in the latest release and if you find that this is still a problem, please feel free to comment or open a new issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ruby S3 "Access Denied" error when calling upload_file with ...
This seems to work fine, except that the file isn't publicly available, and I can't get a public URL for it. But when...
Read more >
Resolve Access Denied errors from a CloudFront distribution ...
To troubleshoot Access Denied errors, first determine if your distribution's origin domain name is an S3 website endpoint or an S3 REST API ......
Read more >
Troubleshoot IAM-related Access Denied errors in Amazon S3
An AWS Identity and Access Management (IAM) user has permission to the s3:PutObject action on my Amazon Simple Storage Service (Amazon S3) bucket....
Read more >
Getting access denied error in s3 bucket policy even ... - Reddit
So someone with admin access, or even S3 read only, ... CloudFront is the answer there, or turn off the ACL that blocks...
Read more >
Sets the permissions on an existing bucket using access ...
If your bucket uses the bucket owner enforced setting for S3 Object Ownership, ACLs are disabled and no longer affect permissions. You must...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found