소프트웨어개발/Amazon Web Service

[AWS] EC2에 S3를 마운트 (s3fs)

곽코딩 2014. 2. 27. 16:41
반응형

1. s3fs 설치



 

2. s3 bucket 마운트


aws accesskey / secretkey 등록

$touch /etc/passwd-s3fs && chmod 640 /etc/passwd-s3fs && echo '[accesskey]:[secretkey]' > /etc/passwd-s3fs


마운트할 디렉토리를 생성

$mkdir -p /mnt/s3/[bucketname]


마운트

$s3fs [bucketname] -o use_cache=/tmp -o allow_other /mnt/s3/[bucketname]


root가 아닌 일반 사용자의 접근을 위해

/etc/fuse.conf 에서 user_allow_other 옵션 주석 풀기


3. 언마운트


$sudo fusermount -u /mnt/s3/[bucketname]