How to Mount an AWS S3 Bucket Locally on Linux Using Mountpoint

The day has finally come. Mountpoint for Amazon S3 is now generally available. Probably the most anticipated headline since ChatGPT.

Mountpoint for AWS S3

Mountpoint for AWS S3 is a high-throughput open source file client for mounting an Amazon S3 bucket as a local file system on Linux. Mountpoint automatically translates read and write operations into S3 object API calls, giving applications access to the elastic storage and throughput of Amazon S3 through a file interface.

Installation

On a Debian-based system, use the following:

$ MOUNTPOINT_VERSION="1.0.0"
$ curl -fsSL -o mount-s3.deb "https://s3.amazonaws.com/mountpoint-s3-release/${MOUNTPOINT_VERSION}/x86_64/mount-s3-${MOUNTPOINT_VERSION}-x86_64.deb"
$ sudo apt install ./mount-s3.deb
$ mount-s3 --version

On a RHEL-based system, use the following:

$ MOUNTPOINT_VERSION="1.0.0"
$ curl -fsSL -o mount-s3.rpm "https://s3.amazonaws.com/mountpoint-s3-release/${MOUNTPOINT_VERSION}/x86_64/mount-s3-${MOUNTPOINT_VERSION}-x86_64.rpm"
$ sudo yum install ./mount-s3.rpm
$ mount-s3 --version

Configuration

To use Mountpoint for S3, you needs valid AWS credentials with access to the bucket that you intend to mount. Retrieve your AWS credentials and save them in the file ~/.aws/credentials.

Create a directory to use for mounting, and mount an S3 bucket named my-s3-bucket-name specifying your AWS profile (it is called default in this example but can be anything):

$ mkdir ~/mnt
$ mount-s3 --profile default --region eu-west-2 my-s3-bucket-name ~/mnt

If you need to unmount the S3 bucket, use the following:

$ umount ~/mnt

Leave a Reply

Your email address will not be published. Required fields are marked *