본문 바로가기
[AWS]/ROG

[AWS] Rclone을 사용하여 Windows에서 AWS S3 마운트 탑재

by SAMSUNG CLOUD-OKY 2022. 4. 19.
반응형

 

## 버킷에 폴더 생성후, 임의의 파일 있어야함

 

 

## 비공개 S3 버킷 생성

 

- 폴더 만들기 (필수)

 

- 샘플 사진 업로드

 

 

## 접속용 Windows EC2 생성

 

- 크롬 설치

 

- Git 설치

 

 

 

- 1. Winfsp 안정화 버전 설치 할 것

 

- 2. Rclone 다운로드

 

 

- 버킷명 제약사항 있음 ( . 사용할 수 없음)

 

- 버킷 재생성 (cloudgeeks-ca)

 

- 재시도

 

- 4 입력

 

- 1 입력

 

- Access Key 입력

 

- 리전 선택 (나머지 모든 설정 엔터 진행)

 

- 엔터후 최종 종료

 

- RC 실행

 

 

 

 

 

## S3 접속화면

 

- 폴더와 Readme.txt 파일을 동시에 만들어서 복사하기

 

 

 

 



## 마운트 드라이브 지속성 설정 (Windows 작업)

# How to automate mounting an S3 bucket on Windows boot

# It is convenient when the bucket is mounted as a network drive automatically on Windows boot. Let’s find out how to configure automatic mounting of the S3 bucket in Windows.

# Create the rclone-S3.cmd file in the C:\rclone\ directory.

# Add the string to the rclone-S3.cmd file:

C:\rclone\rclone.exe mount cloudgeeks-ca:/ S: --vfs-cache-mode full

#####################################################################################
Save the CMD file. You can run this CMD file instead of typing the command to mount the S3 bucket manually.

Copy the rclone-S3.cmd file to the startup folder for all users:

C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp

## 위치로 복사하기

 

 

 

 

 

 

 

 

 

 

 

 

==============================================

https://github.com/quickbooks2018/aws/blob/master/s3-mount

 
  # Windows S3 MOUNT
  -------------------
   
  ### Rule ### ---> Do not create empty folders in s3 or windows, it will not work
   
   
  1. Download ---> Winfsp ---> Windows Mount as Drive ---> https://github.com/billziss-gh/winfsp/releases
   
  2a. Rclone ---> Rclone ---> OpenSource Cli tools for almost all cloud storages ---> https://rclone.org/downloads/
   
  2b. GIT Bash ---> https://git-scm.com/downloads
   
  3. Create s3 bucket
   
  #######################################################################################################
  4. mkdir /c/rclone
   
  cd /c/rclone && curl -# -LO https://downloads.rclone.org/v1.53.3/rclone-v1.53.3-windows-amd64.zip
   
  unzip rclone-v1.53.3-windows-amd64.zip
   
  cd rclone-v1.53.3-windows-amd64
   
  ./rclone.exe config
   
  ./rclone mount cloudgeeks-ca:/ S: --vfs-cache-mode full -vv
   
  #########################################################################################################
   
  # Above We have performed this mention below steps via GitBash
  ---------------------------------------------------------------
   
  ---> echo "C:\rclone\rclone.exe mount cloudgeeks-ca:/ S: --vfs-cache-mode full" > rclone-S3.cmd
   
  ---> cp /c/rclone/rclone-S3.cmd /c/ProgramData/Microsoft/Windows/Start\ Menu/Programs/StartUp/rclone-S3.cmd
   
  # How to automate mounting an S3 bucket on Windows boot
   
  # It is convenient when the bucket is mounted as a network drive automatically on Windows boot. Let’s find out how to configure automatic mounting of the S3 bucket in Windows.
   
  # Create the rclone-S3.cmd file in the C:\rclone\ directory.
   
  # Add the string to the rclone-S3.cmd file:
   
  C:\rclone\rclone.exe mount cloudgeeks-ca:/ S: --vfs-cache-mode full
   
  #####################################################################################
  Save the CMD file. You can run this CMD file instead of typing the command to mount the S3 bucket manually.
   
  Copy the rclone-S3.cmd file to the startup folder for all users:
   
  C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp
   
  As an alternative, you can create a shortcut to C:\Windows\System32\cmd.exe and set arguments needed to mount an S3 bucket in the target properties:
   
  C:\Windows\System32\cmd.exe /k cd c:\rclone & rclone mount blog-bucket01:blog-bucket01/ S: --vfs-cache-mode full
   
   
  # S3 Policy
  ---------------
   
  {
  "Version": "2012-10-17",
  "Statement": [
  {
  "Effect": "Allow",
  "Action": [
  "s3:ListBucket"
  ],
  "Resource": "arn:aws:s3:::BUCKET-NAME"
  },
  {
  "Effect": "Allow",
  "Action": [
  "s3:PutObject*",
  "s3:GetObject*",
  "s3:DeleteObject*"
  ],
  "Resource": "arn:aws:s3:::BUCKET-NAME/*"
  }
  ]
  }
   
   
   
   
   
   
   
   
   
   
   
   
  # https://www.nakivo.com/blog/mount-amazon-s3-as-a-drive-how-to-guide/
  # https://blog.spikeseed.cloud/mount-s3-as-a-disk/
   
 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

https://www.youtube.com/watch?v=9mRzKdmHMOE&t=246s 

 

 

반응형

댓글