Ubuntu Server挂载AWS S3成一个本地文件夹

2023年,AWS出了个mountpoint的工具:

https://github.com/awslabs/mountpoint-s3


如下是另外一种方式,通过s3fs-fuse 这个工具

bash 复制代码
sudo apt-get install automake autotools-dev \fuse g++ git libcurl4-gnutls-dev libfuse-dev \libssl-dev libxml2-dev make pkg-config

git clone  https://github.com/s3fs-fuse/s3fs-fuse.git

cd s3fs-fuse

sudo ./autogen.sh

sudo ./configure

sudo make

sudo make install

sudo vim /etc/passwd-s3fs
##添加key如下
key format: AKIAJExxxxxxxxxxxxxxxxxxxxxxx:Gcdpi2axxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

sudo chmod 640 /etc/passwd-s3fs

sudo mkdir -p /s3/folder-name

sudo s3fs -o allow_other bucket-name /s3/folder-name
bash 复制代码
##中国区AWS S3挂载路径不同:
sudo s3fs -o allow_other bucket-name /s3/folder-name -o url=https://s3.cn-north-1.amazonaws.com.cn
bash 复制代码
##取消挂载:
sudo umount -l /s3/folder-name

##写入/etc/fstab 实现开机自动挂载
sudo vim /etc/fstab
##在末尾添加如下
bucket-name /s3/folder-name fuse.s3fs _netdev,allow_other 0 0
相关推荐
亚林瓜子15 分钟前
AWS Glue Python Shell中获取外网ip
python·tcp/ip·http·shell·aws·vpc·glue
TG_yunshuguoji2 小时前
阿里云代理商:2026年云端与本地双轨部署OpenClaw 方案
服务器·阿里云·云计算·openclaw
sheeta19984 小时前
TypeScript references 配置与 emit 要求详解
javascript·ubuntu·typescript
ancktion4 小时前
ubuntu多gcc版本切换
linux·运维·ubuntu
lagrahhn5 小时前
无服务器计算简单介绍
云原生·云计算·无服务器
贵沫末5 小时前
Claude Code使用
ubuntu
zhojiew5 小时前
在中国区aws通过Network Flow Monitor实现实例网络流量指标上传到cloudwatch
服务器·网络·aws
DeepHacking6 小时前
Ubuntu 22.04 安装 Allow Locked Remote Desktop 扩展:解决锁屏后 mstsc 无法连接的问题
linux·运维·ubuntu
亚林瓜子6 小时前
AWS Glue Python Shell任务中获取AWS SM中的加密配置
python·aws·glue·sm
chaofan9807 小时前
2026年企业级AI基建:AWS Bedrock高并发架构深度实践与成本治理实操录
人工智能·架构·aws