mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2026-04-25 13:26:00 +03:00
[GH-ISSUE #2612] The authorization header is malformed; a non-empty Access Key (AKID) must be provided in the credential (EC2 with IAM Role) #1247
Labels
No labels
bug
bug
dataloss
duplicate
enhancement
feature request
help wanted
invalid
need info
performance
pull-request
question
question
testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/s3fs-fuse#1247
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Cookieees on GitHub (Nov 16, 2024).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/2612
Additional Information
Version of s3fs being used (
s3fs --version)Version of fuse being used (
pkg-config --modversion fuse,rpm -qi fuseordpkg -s fuse)Kernel information (
uname -r)GNU/Linux Distribution, if applicable (
cat /etc/os-release)How to run s3fs, if applicable
[ x ] command line
[ ] /etc/fstab
s3fs syslog messages (
grep s3fs /var/log/syslog,journalctl | grep s3fs, ors3fs outputs)The part of Syslog output (grep s3fs)
The main is:
Details about issue
I want to mount an s3 bucket to my EC2 instance in AWS. But it seems that s3fs is somehow not performing requests to s3 correctly.
I have checked access to the bucket from this instance using aws-cli, aws sdk (via a simple Python script)
and also checked for credentials using
curl -s http://169.254.169.254/latest/meta-data/iam/security-credentials/<role_name>.All of this works.
In the end I even inserted AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY_KEY and AWS_SESSION_TOKEN into the environment variables with the values of the temporary credetials from the AWS SSO page. And s3fs successfully mounted the bucket and the mount worked, of course until the credetials expired.
I also tried specifying for the
-o iam_roleoption in addition to theautovalue the name of the actual IAM role - same result.If I don't specify this option at all I get the
s3fs: could not determine how to establish security credentials.errorAlso I tried to use and not to use the option
pathstyle- the result did not change.But in the end, the same command specified at the beginning of the Issue, but without the iam_role option, with temporary creds in the environment variables - successfully performed the mount.
Is it possible to make s3fs work successfully with iam_role?
@ScottSorrentino commented on GitHub (Nov 19, 2024):
I can confirm running into this same issue with the latest code. Seeing the same "malformed response / non-empty AKID must be provided" messages when running with debugging enabled. No change in behavior when using IMDSv1 or IMDSv2 on an EC2 instance with an attached Instance Profile; both fail to access the bucket.
Looks like the issue may have been introduced as part of the refactor to introduce
s3fs_threadreqs.cppinefc23316e9.@nikovolkov commented on GitHub (Nov 21, 2024):
faced same issue
@mvisser-nhb commented on GitHub (Jan 8, 2025):
I rolled back to v1.94 and using iam_role=auto works again.
Script I use to mount my s3 bucket, where I added checking out to v1.94, basically pinning it to that version
@ggtakec commented on GitHub (Jan 18, 2025):
@ScottSorrentino @nikovolkov @mvisser-nhb Thanks for your kind reports.
I have confirmed that this is a bug in v1.95.
The cause is not the merge of
github.com/s3fs-fuse/s3fs-fuse@efc23316e9(this code has been merged since v1.95), but the addition of this line in #2535.The current master branch also has a similar bug, and we are considering a fix for it.
@ggtakec commented on GitHub (Jan 18, 2025):
This issue can be resolved by deleting this line, but the current master branch no longer has the code for this issue.
Instead, the
iam_roleauthentication code was no longer working due to a different cause, so I am promoting a fix for #2635.If you can use the master branch code, please use it after merging it.
(If you can only use the package, please use v1.94.)