2023年,AWS出了个mountpoint的工具:
https://github.com/awslabs/mountpoint-s3
如下是另外一种方式,通过s3fs-fuse 这个工具
sudo apt-get install automake autotools-dev \fuse g++ git libcurl4-gnutls-dev libfuse-dev \libssl-dev libxml2-dev make pkg-configgit clone https://github.com/s3fs-fuse/s3fs-fuse.gitcd s3fs-fusesudo ./autogen.shsudo ./configuresudo makesudo make installsudo vim /etc/passwd-s3fs
##添加key如下
key format: AKIAJExxxxxxxxxxxxxxxxxxxxxxx:Gcdpi2axxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxsudo chmod 640 /etc/passwd-s3fssudo mkdir -p /s3/folder-namesudo s3fs -o allow_other bucket-name /s3/folder-name
##中国区AWS S3挂载路径不同:
sudo s3fs -o allow_other bucket-name /s3/folder-name -o url=https://s3.cn-north-1.amazonaws.com.cn
##取消挂载:
sudo umount -l /s3/folder-name##写入/etc/fstab 实现开机自动挂载
sudo vim /etc/fstab
##在末尾添加如下
bucket-name /s3/folder-name fuse.s3fs _netdev,allow_other 0 0