Hướng Dẫn Kết Nối Fstorage với AWS CLI
Download AWS CLI https://awscli.amazonaws.com/AWSCLIV2.msi
1. Cài đặt AWS CLI
Bấm Finish để hoàn tất việc cài đặt.
Sau khi cài đặt thành công mở Windows Powershell lên xem Awscli đã chạy được chưa
kiểm tra bằng command
aws -h
2. Cấu hình kết nối với Fstorage
Gõ lệnh.
aws configure --profile fstorage
Nhập các thông tin tài khoản Fstorage
AWS Access Key ID [None]: xxxxxxxxxxx
AWS Secret Access Key [None]: xxxxxxxxxxxxxxxxxxxxxxxxxx
Default region name [None]: hcm1
Default output format [None]: json
Chạy command để kiểm tra kết nối
Chạy command:
aws s3 --profile fstorage --endpoint-url https://hcm1.fstorage.vn ls s3://
như vậy là đã kết nối thành công với Fstorage
Copy file từ máy tính lên Fstorage
aws s3 --profile fstorage --endpoint-url https://hcm1.fstorage.vn cp D:\access.log s3://multicloud
Awscli hỗ trợ một số command
ls : list danh sách Bucket/File/Folder
cp : copy file/folder từ máy tính lên Fstorage hoặc ngược lại
rm : xóa file/folder
mb : tạo bucket
rb : xóa bucket
mv : move file/folder từ máy tính lên Fstorage và ngược lại
sync : đồng bộ dữ liệu từ máy tính lên Fstorage và ngược lại