Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to mount Directory bucket in read-only mode #1076

Open
jy-frankfan opened this issue Oct 23, 2024 · 1 comment
Open

Failed to mount Directory bucket in read-only mode #1076

jy-frankfan opened this issue Oct 23, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@jy-frankfan
Copy link

jy-frankfan commented Oct 23, 2024

Mountpoint for Amazon S3 version

mount-s3 1.7.1

AWS Region

us-east-1

Describe the running environment

  • Running in EKS where the nodegroup is a self-managed EC2 ASG.
  • No
  • IRSA
  • Ubuntu 22.04

Mountpoint options

'mount-s3 <my-bucket> /tmp -d --allow-other --auto-unmount --foreground --read-only --force-path-style;

What happened?

Mountpoint failed with IAM issue when the S3 Directory Bucket Policy has

{
    "Effect": "Allow",
    "Principal": {
        "AWS": [
            "<IAM role ARN>",
        ]
    },
    "Action": "s3express:CreateSession",
    "Resource": "arn:aws:s3express:us-east-1:<account-id>:bucket/<bucket>",
    "Condition": {
        "StringEquals": {
            "s3express:SessionMode": "ReadOnly"
        }
    }
}

It works normally if the Condition block is removed.

I wonder if mount-s3 include x-amz-create-session-mode: ReadOnly when --read-only is given in the argument.

Relevant log output

No response

@jy-frankfan jy-frankfan added the bug Something isn't working label Oct 23, 2024
@dannycjones
Copy link
Contributor

dannycjones commented Oct 23, 2024

Thanks for opening this issue, @jy-frankfan. We are aware of the issue, Mountpoint currently will create a ReadWrite S3 Express session regardless of the --read-only flag.

I'll share with the team, as we'd like for the session to be created using ReadOnly mode in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants