1、到AWS的IAM创建用户,并且获取到访问密钥 ID 和私有访问密钥。下载密钥并保存。
2、到http://docs.amazonaws.cn/cli/latest/userguide/installing.html#install-msi-on-windows
下载对应系统的AWS CLI MSI 软件。
3、到https://www.python.org/downloads/下载python-2.7.10.msi,并安装。
4、配置python的运行路径
包括三个路径
C:Python27;
C:Python27Libsite-packages;
C:Python27Scripts
5、首先,检查是否已安装 Python:
$ python --version
6、安装 pip
> pip install awscli
7、测试 AWS CLI 安装
6、安装 pip
使用 pip 安装 AWS CLI
Python 和 pip 安装完毕后,使用 pip 安装 AWS CLI:
Windows
7、测试 AWS CLI 安装
查看帮助文件,确认已正确安装 CLI:
$ aws help
8、导入AWS密钥,该密钥必须有S3权限
aws configure
地区北京AWS写cn-north-1
9、在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.
8、导入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
9、在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.