- Newest
- Most votes
- Most comments
When you use the AWS CLI with the put-object command, the CLI automatically sets the x-amz-acl header to bucket-owner-full-control, which is a compatible ACL setting for your bucket. This allows the upload to succeed.
💡 You can find more information about the
x-amz-aclheader and its usage in the Amazon S3 documentation here.
However, in the AWS Console, the default behavior is to use the private ACL when uploading objects (Blocking all public access). Since your bucket has ACLs disabled, the Console upload fails with the error you've encountered.
💡 You can learn more about the effects of these rules by visiting the Block public access settings page in the Amazon S3 documentation.
My team was struggling with this same use case. What we found was that the bucket policy needs to be changed (on the bucket owner's side, i.e. Account A) to permit s3:GetBucketOwnershipControls. This will allow the Account B user to retrieve the bucket's ownership settings and see that ACLs are disabled, and Account B user's console will no longer automatically try to send the upload request with ACL headers included.

thanks for all the details. Is there a way to pass x-amz-acl when I upload through console? or do I have to enable ACL on my bucket to allow console to upload?