AWS CLI以及AWS S3 SYNC命令行使用

 一、到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. 
相关文章
相关标签/搜索