mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2026-04-25 13:26:00 +03:00
[GH-ISSUE #1743] Cross account mounting bucket on EC2 instance via iam role got 403 denied #896
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#896
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 @coolthluo on GitHub (Aug 17, 2021).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/1743
Additional Information
The following information is very important in order to help us to help you. Omission of the following details may delay your support request or receive no attention at all.
Keep in mind that the commands we provide to retrieve information are oriented to GNU/Linux Distributions, so you could need to use others if you use s3fs on macOS or BSD
Version of s3fs being used (s3fs --version)
_example: 1.89
Version of fuse being used (pkg-config --modversion fuse, rpm -qi fuse, dpkg -s fuse)
_example: 2.9.2
Kernel information (uname -r)
_command result: 4.14.238-182.422.amzn2.x86_64
GNU/Linux Distribution, if applicable (cat /etc/os-release)
command result: cat /etc/os-release
s3fs command line used, if applicable
/etc/fstab entry, if applicable
s3fs syslog messages (grep s3fs /var/log/syslog, journalctl | grep s3fs, or s3fs outputs)
if you execute s3fs with dbglevel, curldbg option, you can get detail debug messages
Details about issue
Hi All
Account A: Account has destination s3 bucket.
Account B: My EC2 instance account.
I want to mount account A's s3 bucket on account B(EC2 instance).
I've followed this tutorial https://aws.amazon.com/premiumsupport/knowledge-center/cross-account-access-s3/
to set up Cross-account IAM roles.
I am able to fetch bucket info via AWS CLI
aws s3 ls, which means the cross account permission setup is correctThis is my
~/.aws/config,And
~/.aws/crendentialsis emptyI tried to add
-o profile=defaultbut won't work.However I am still getting 403 access denied error when trying on mount bucket via iam role.
Is S3FS supporting this cross account assume role mount? Is there way we can force S3FS to use the default config and auth as specific role_arn?
arn:aws:iam::AccountA:role/AccountA-bucket-roleI did check some issues but don't see any useful answer, looking forward for any help, thank you!
@rads18 commented on GitHub (Jul 9, 2022):
Is there an update on this issue please? its a gr8 utility but we have an app spread across various accounts and wanted to use a common mount S3 source when extracting a config log for ease of use.
Please suggest!
thanks
@ggtakec commented on GitHub (Jul 9, 2022):
It looks like the token can be obtained from the meta url(
/latest/meta-data/iam/security-credentials/xxxxxxxRole).And when s3fs accessed the bucket, it seems that s3fs received a 403.
It seems that the access rights are not appropriate, so it seems good to check the Bucket or EC2 settings.
Could anyone give us some advice on the settings?
@rads18 commented on GitHub (Jul 9, 2022):
i have tried the same creds to run an AWS S3 copy /move for a bucket(in account A) from account B (EC2 instance) and that works smoothly. It's just the mount for a bucket(in A) to EC2 (in B) does not succeed, local bucket from B mounts fine in its EC2
Also, i should clarify for testing purpose i am not using any Meta reference, just created a pass file with access/secret
like so,
s3fs (bucketname A) /mnt -o passwd_file=~/.passwd-s3fs