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

 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:\Python27\Lib\site-packages;
C:\Python27\Scripts
5、首先,检查是否已安装 Python:

 
$ python --version

6、安装 pip
使用 pip 安装 AWS CLI
 
Python 和 pip 安装完毕后,使用 pip 安装 AWS CLI:
 
Windows
 
> pip install awscli

7、测试 AWS CLI 安装
 
查看帮助文件,确认已正确安装 CLI:
 
$ aws help

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. 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值