一、到AWS的IAM建立用戶,而且獲取到訪問密鑰 ID 和私有訪問密鑰。下載密鑰並保存。
二、到http://docs.amazonaws.cn/cli/latest/userguide/installing.html#install-msi-on-windows
下載對應系統的AWS CLI MSI 軟件。
三、到https://www.python.org/downloads/下載python-2.7.10.msi,並安裝。
四、配置python的運行路徑
包括三個路徑
C:\Python27;
C:\Python27\Lib\site-packages;
C:\Python27\Scripts
五、首先,檢查是否已安裝 Python:html
$ python --version
六、安裝 pip
使用 pip 安裝 AWS CLI
Python 和 pip 安裝完畢後,使用 pip 安裝 AWS CLI:
Windows
> pip install awscli
七、測試 AWS CLI 安裝
查看幫助文件,確認已正確安裝 CLI:
$ aws help
八、導入AWS密鑰,該密鑰必須有S3權限
aws configure
地區北京AWS寫cn-north-1
- us-east-1
- ap-northeast-1
- sa-east-1
- ap-southeast-1
- ap-southeast-2
- us-west-2
- us-gov-west-1
- us-west-1
- cn-north-1
- eu-west-1
- fips-us-gov-west-1
九、在AWS的S3上建立好存儲桶,好比1771test,而後用下面的命令上傳本地目錄的全部文件,並容許全部人開放的權限。 aws s3 sync . s3://1771test --acl public-read --acl (string) Sets the ACL for the object when the command is performed. Only accepts values of private, public-read, public-read-write, authenticated-read, bucket-owner-read, bucket-owner-full-control and log-delivery-write.