Configuration and usage - Amazon Simple Storage Service
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Configuration and usage

To use Mountpoint for Amazon S3, your host needs valid Amazon credentials with access to the bucket or buckets that you would like to mount. For different ways to authenticate, see Mountpoint Amazon Credentials on GitHub.

For example, you can create a new Amazon Identity and Access Management (IAM) user and role for this purpose. Make sure that this role has access to the bucket or buckets that you would like to mount. You can pass the IAM role to your Amazon EC2 instance with an instance profile.

Use Mountpoint for Amazon S3 to do the following:

  1. Mount buckets with the mount-s3 command.

    In the following example, replace DOC-EXAMPLE-BUCKET with the name of your S3 bucket, and replace ~/mnt with the directory on your host where you want your S3 bucket to be mounted.

    mkdir ~/mnt mount-s3 DOC-EXAMPLE-BUCKET ~/mnt

    Because the Mountpoint client runs in the background by default, the ~/mnt directory now gives you access to the objects in your S3 bucket.

  2. Access the objects in your bucket through Mountpoint.

    After you mount your bucket locally, you can use common Linux commands, such as cat or ls, to work with your S3 objects. Mountpoint for Amazon S3 interprets keys in your S3 bucket as file system paths by splitting them on the forward slash (/) character. For example, if you have the object key Data/2023-01-01.csv in your bucket, you will have a directory named Data in your Mountpoint file system, with a file named 2023-01-01.csv inside it.

    Mountpoint for Amazon S3 intentionally does not implement the full POSIX standard specification for file systems. Mountpoint is optimized for workloads that need high-throughput read and write access to data stored in Amazon S3 through a file system interface, but that otherwise do not rely on file system features. For more information, see Mountpoint for Amazon S3 file system behavior on GitHub. Customers that need richer file system semantics should consider other Amazon file services, such as Amazon Elastic File System (Amazon EFS) or Amazon FSx.

  3. Unmount your bucket by using the umount command. This command unmounts your S3 bucket and exits Mountpoint.

    To use the following example command, replace ~/mnt with the directory on your host where your S3 bucket is mounted.

    umount ~/mnt

    To get a list of options for this command, run umount --help.

For additional Mountpoint configuration details, see S3 bucket configuration, and file system configuration on GitHub.