[GH-ISSUE #2046] AWS Alpine iam_role argument ignored when using fstab #1035

Closed
opened 2026-03-04 01:50:50 +03:00 by kerem · 4 comments
Owner

Originally created by @RoyceTheBiker on GitHub (Oct 15, 2022).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/2046

Compiled s3fs from source, version 1.91.
Mounting the S3 using the command and iam_role option works exactly as expected. Using fstab setting fails with an error

s3fs: could not determine how to establish security credentials.
mount: mounting s3fs on /s3 failed: No such file or directory

Additional Information

AWS Alpine Linux 3.15.6 running in AWS EC2 instance
"ImageId": "ami-0a31e7dfd86d40bad",
"ImageLocation": "538276064493/alpine-3.15.6-x86_64-bios-cloudinit-r0"

Version of s3fs being used (s3fs --version)

git clone --branch v1.91 --single-branch https://github.com/s3fs-fuse/s3fs-fuse.git

Version of fuse being used (pkg-config --modversion fuse, rpm -qi fuse, dpkg -s fuse)

fuse-2.9.9-r1

Kernel information (uname -r)

5.15.59-0-virt

GNU/Linux Distribution, if applicable (cat /etc/os-release)

NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.15.6
PRETTY_NAME="Alpine Linux v3.15"
HOME_URL="https://alpinelinux.org/"
BUG_REPORT_URL="https://bugs.alpinelinux.org/"

s3fs command line used, if applicable

This works in Alpine and AL2

s3fs -o iam_role='S3_Access' ${S3_BUCKET_NAME} /s3/

/etc/fstab entry, if applicable

This works in AL2, but fails in Alpine

s3fs#${S3_BUCKET_NAME} /s3 fuse rw,iam_role=S3_Access 0 0

These also fail in Alpine

s3fs#${S3_BUCKET_NAME} /s3 fuse rw,iam_role=auto 0 0
s3fs#${S3_BUCKET_NAME} /s3 fuse rw,iam_role 0 0

s3fs syslog messages (grep s3fs /var/log/syslog, journalctl | grep s3fs, or s3fs outputs)

I have been testing with various levels of debugging. I may try to run in a gdb wrapper if no one knows a workaround.

Details about the issue

I suspect that the Alpine system has a library that is not performing correctly, possibly in a curl request for the instance role. I can't commit a lot of time to this but I would like to know a solution. Alpine is a great OS for EC2 instances because of its small footprint and low resource demand. I will proceed using an init script that mounts S3 using the CLI that works. If this is an issue with Alpine version of the mount program, it could be helpful to report it to the Alpine team. If I am unable to resolve the problem, I will post a link to the OSS project branch.

Originally created by @RoyceTheBiker on GitHub (Oct 15, 2022). Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/2046 Compiled s3fs from source, version 1.91. Mounting the S3 using the command and iam_role option works exactly as expected. Using **fstab** setting fails with an error ``` s3fs: could not determine how to establish security credentials. mount: mounting s3fs on /s3 failed: No such file or directory ``` ### Additional Information AWS Alpine Linux 3.15.6 running in AWS EC2 instance "ImageId": "ami-0a31e7dfd86d40bad", "ImageLocation": "538276064493/alpine-3.15.6-x86_64-bios-cloudinit-r0" #### Version of s3fs being used (s3fs --version) git clone --branch v1.91 --single-branch https://github.com/s3fs-fuse/s3fs-fuse.git #### Version of fuse being used (pkg-config --modversion fuse, rpm -qi fuse, dpkg -s fuse) fuse-2.9.9-r1 #### Kernel information (uname -r) 5.15.59-0-virt #### GNU/Linux Distribution, if applicable (cat /etc/os-release) NAME="Alpine Linux" ID=alpine VERSION_ID=3.15.6 PRETTY_NAME="Alpine Linux v3.15" HOME_URL="https://alpinelinux.org/" BUG_REPORT_URL="https://bugs.alpinelinux.org/" #### s3fs command line used, if applicable This works in Alpine and AL2 ``` s3fs -o iam_role='S3_Access' ${S3_BUCKET_NAME} /s3/ ``` #### /etc/fstab entry, if applicable This works in AL2, but fails in Alpine ``` s3fs#${S3_BUCKET_NAME} /s3 fuse rw,iam_role=S3_Access 0 0 ``` These also fail in Alpine ``` s3fs#${S3_BUCKET_NAME} /s3 fuse rw,iam_role=auto 0 0 s3fs#${S3_BUCKET_NAME} /s3 fuse rw,iam_role 0 0 ``` #### s3fs syslog messages (grep s3fs /var/log/syslog, journalctl | grep s3fs, or s3fs outputs) I have been testing with various levels of debugging. I may try to run in a gdb wrapper if no one knows a workaround. ### Details about the issue I suspect that the Alpine system has a library that is not performing correctly, possibly in a curl request for the instance role. I can't commit a lot of time to this but I would like to know a solution. Alpine is a great OS for EC2 instances because of its small footprint and low resource demand. I will proceed using an init script that mounts S3 using the CLI that works. If this is an issue with Alpine version of the **mount** program, it could be helpful to report it to the Alpine team. If I am unable to resolve the problem, I will post a link to the OSS project branch.
kerem closed this issue 2026-03-04 01:50:50 +03:00
Author
Owner

@ggtakec commented on GitHub (Feb 12, 2023):

@RoyceTheBiker
In ALPINE, if you authenticate with credentials without using the iam_role option, will it work properly?

I have tried in ALPINE with below steps and it is working for credentials.

# apk add automake autoconf util-linux-misc fuse fuse-dev libxml2-dev curl-dev

$ cd s3fs-fuse
$ autoupdate
$ ./autoge.sh
$ ./configure
$ make
$ src/s3fs <bucket> /mnt/s3 -o allow_other,dbglevel=info,curldbg -f

ALPINE has a newer version of autoconf, so you need to run autoupdate.
Also, a curl warning appears during make. (can be ignored for now)

I'll try to prepare for ALPINE support after the next release.(#2110)

<!-- gh-comment-id:1426949501 --> @ggtakec commented on GitHub (Feb 12, 2023): @RoyceTheBiker In ALPINE, if you authenticate with credentials without using the iam_role option, will it work properly? I have tried in ALPINE with below steps and it is working for credentials. ``` # apk add automake autoconf util-linux-misc fuse fuse-dev libxml2-dev curl-dev $ cd s3fs-fuse $ autoupdate $ ./autoge.sh $ ./configure $ make $ src/s3fs <bucket> /mnt/s3 -o allow_other,dbglevel=info,curldbg -f ``` _ALPINE has a newer version of autoconf, so you need to run autoupdate._ _Also, a curl warning appears during make. (can be ignored for now)_ I'll try to prepare for ALPINE support after the next release.(#2110)
Author
Owner

@RoyceTheBiker commented on GitHub (Feb 14, 2023):

As I posted in the ticket, it works fine from the command line, not from fstab.

I will try to add the debug option to see if that provides any more details.

<!-- gh-comment-id:1429020630 --> @RoyceTheBiker commented on GitHub (Feb 14, 2023): As I posted in the ticket, it works fine from the command line, not from fstab. I will try to add the debug option to see if that provides any more details.
Author
Owner

@ggtakec commented on GitHub (Feb 19, 2023):

@RoyceTheBiker Thanks,
It looks like the only thing that needed fixing was the OpenSSL3 support.
That fix is in the current master branch.
Adding a build for ALPINE to Github Actions, fixing autogen.sh, etc. will be a work in the future(after new release).

<!-- gh-comment-id:1435912943 --> @ggtakec commented on GitHub (Feb 19, 2023): @RoyceTheBiker Thanks, It looks like the only thing that needed fixing was the OpenSSL3 support. That fix is in the current master branch. Adding a build for ALPINE to Github Actions, fixing autogen.sh, etc. will be a work in the future(after new release).
Author
Owner

@ggtakec commented on GitHub (Mar 19, 2023):

This will be closed. If you still have problems, please reopen or post a new issue.

<!-- gh-comment-id:1475127486 --> @ggtakec commented on GitHub (Mar 19, 2023): This will be closed. If you still have problems, please reopen or post a new issue.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/s3fs-fuse#1035
No description provided.