aws ec2挂载 s3

配置s3 挂载 aws ec2

安装依赖包:yum install -y automake fuse fuse-devel gcc-c++ git libcurl-devel libxml2-devel make openssl-devel

下载,编译并安装s3fs: git clone https://github.com/s3fs-fuse/s3fs-fuse.git && cd s3fs-fuse && ./autogen.sh && ./configure && make && make install

配置iam角色,授权相应bucket的权限,将配好的iam role 的 access key 写入到秘钥文件:echo AKIAIOEO4E2VOHLxxxxx:2LXBboddEpRLmWl48i3+b4ziwPL3bJ4vxxxxxxxx > /etc/passwd-s3fs

挂载bucket 到ec2: /usr/local/bin/s3fs bucketname /test -o passwd_file=/etc/passwd-s3fs -o endpoint=eu-central-1 -ourl="https://s3.eu-central-1.amazonaws.com"

https://aws.amazon.com/cn/blogs/china/s3fs-amazon-ec2-linux/

  • 我的微信
  • 这是我的微信扫一扫
  • weinxin
  • 我的微信公众号
  • 我的微信公众号扫一扫
  • weinxin
avatar

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: