目的
Linux服務器通過AWS命令行上傳文件至S3。
連接你的Linux服務器,按照以下步驟操作。
# 安裝pip
yum -y install python-pip
# 安裝awscli
pip install awscli
# 初始化配置
> aws configure
AWS Access Key ID [None]:
AWS Secret Access Key [None]:
Default region name [None]:
Default output format [None]:
上傳操作命令:
查看某一服務器下內容
> aws s3 ls s3://***/
復制單個文件到aws上去
> aws s3 cp ./*** s3://***/***
復制一個目錄中的內容到aws上去
> aws s3 sync d:/test s3://***/***/