安装

在centos中安装aws cli,安装依赖python,先装好python,然后按下述命令执行

yum install wget
wget https://bootstrap.pypa.io/get-pip.py
python get-pip.py
pip install awscli

配置

在使用之前需要配置自己的key ID及 Access Key,执行aws configure,一步步配置如下:

AWS Access Key ID [None]: AKIAI44QH8DHBEXAMPLE
AWS Secret Access Key [None]: je7MtGbClwBF/2Zp9Utk/h3yCo8nvbEXAMPLEKEY
Default region name [None]: us-east-1
Default output format [None]: text

使用

使用一般要加上自己的文件存储地址,即endpoint,否则会去默认的url去找,找不到

1)查看所有的bucket
aws --endpoint-url http://shbt.s3.xx s3 ls
2)查看某个bucket下的文件
aws --endpoint-url http://shbt.s3.xx s3 ls s3://mobiledict
3)上传单个文件
aws --endpoint-url http://shbt.s3.xx s3 cp /home/yangjiao/m.txt s3://mobiledict
4)批量上传文件,即上传文件夹
aws --endpoint-url http://shbt.s3.xx s3 cp myfolder s3://mybucket/myfolder --recursive
5)创建bucket
aws --endpoint-url http://shbt.s3.xx s3 mb s3://mybucket
6)删除bucket
aws --endpoint-url http://shbt.s3.xx s3 rm s3://mybucket/m.txt

参考文档:https://docs.minio.io/docs/aws-cli-with-minio

https://blog.csdn.net/libing_thinking/article/details/48091743

https://aws.amazon.com/cn/cli/

https://docs.aws.amazon.com/zh_cn/cli/latest/userguide/cli-chap-welcome.html

aws cli command line interface的安装与使用的更多相关文章

  1. Install the AWS Command Line Interface on Linux

    Install the AWS Command Line Interface on Linux You can install the AWS Command Line Interface and i ...

  2. vue-cli 脚手架 Command Line Interface

    mac sudo npm install -g nrm sudo npm config -g set unsafe-perm sudo npm install webpack@3.0.0 -g sud ...

  3. MYSQL5.7脚本运行时出现[Warning] Using a password on the command line interface can be insecure

    MYSQL版本:5.7 在写linux脚本执行MYSQL命令的时候,如果使用 MYSQL="mysql -hlocalhost -P3306 -uroot -p666666" 登陆 ...

  4. 消除Warning: Using a password on the command line interface can be insecure的提示

    最近在部署Zabbix时需要用脚本取得一些MySQL的返回参数,需要是numberic格式的,但是调用脚本时总是输出这一句: Warning: Using a password on the comm ...

  5. MySQL 5.6 Warning: Using a password on the command line interface can be insecure

    MySQL 5.6 在命令行输入密码,就会提示这些安全警告信息. Warning: Using a password on the command line interface can be inse ...

  6. MySQL 5.6 警告信息 command line interface can be insecure 修复

    在命令行输入密码,就会提示这些安全警告信息. Warning: Using a password on the command line interface can be insecure.   注: ...

  7. atprogram.exe : Atmel Studio Command Line Interface

    C:\Program Files\Atmel\Atmel Studio 6.1\atbackend\atprogram.exe No command specified.Atmel Studio Co ...

  8. Centos下_MysqL5.7在使用mysqldump命令备份数据库报错:mysqldump: [Warning] Using a password on the command line interface can be insecure.

    在阿里云服务器增加一个shell脚本定时备份数据库脚本执行任务时,测试性的执行了备份命令,如下 [root@iZ2ze503xw2q1fftv5rhboZ mysql_bak]# /usr/local ...

  9. Warning: Using a password on the command line interface can be insecure.

    [root@qttc ~]# /usr/local/mysql/bin/mysqldump  -uroot -proot db > bak.sqlWarning: Using a passwor ...

随机推荐

  1. 【甘道夫】Eclipse+Maven搭建HBase开发环境及HBaseDAO代码演示样例

    环境: Win764bit Eclipse Version: Kepler Service Release 1 java version "1.7.0_40" 第一步:Eclips ...

  2. NOIP2015_提高组Day2_3_运输计划

    这题思路很简单: 先对每个询问求距离,对距离由大到小排序, 二分最小距离,验证是否可行,验证时用差分处理: #include<iostream> #include<cstring&g ...

  3. 关于<context:annotation-config/>配置

    对于spring项目的一些配置,一直感到有些混乱,今天看到一前辈总结的特别好,把自己的理解贴在这里,有不当的地方,后续继续学习: 当我们使用@Autowired.@Required等这些注解时,就要在 ...

  4. chrome最小字体12px

    http://www.mamicode.com/info-detail-512021.html http://www.divcss5.com/wenji/w738.shtml

  5. C++中map容器的说明和使用技巧

    C++中map容器提供一个键值对容器,map与multimap差别仅仅在于multiple允许一个键对应多个值. 一.map的说明 1 头文件 #include <map> 2 定义 ma ...

  6. mycat的事务支持情况

    中秋国庆一共12天,玩的有点嗨,完全没想工作的事情- -.回来赶紧补补.看了一下mycat关于事务的支持情况,做一下记录. 说mycat的事务支持之前,先说说XA协议,即分布式事务.指的是TM(事务管 ...

  7. oracle下 启动subversion命令 及 oracle相关服务启动备忘

    linux shell下  svnserve - d -r + 目录   例如:svnserve -d -r /svn 启动 svn服务. 访问svn://192.168.0.120/kjcg 测试. ...

  8. bzoj 2600 ricehub

    2600: [Ioi2011]ricehub Time Limit: 10 Sec  Memory Limit: 128 MBSubmit: 783  Solved: 417[Submit][Stat ...

  9. oracle获取一段时间内所有的小时、天、月

    获取一段时间内所有的小时 ) sdate FROM dual CONNECT ; 获取一段时间内所有的天 sdate FROM dual CONNECT ; from user_objects whe ...

  10. Flexpaper二次开发入门教程》(十) Flexpaper简单使用-第一个Flexpaper例子

    4. Flexpaper简单使用 通过上面三章的内容,大家对Flexpaper.SWFTools应该有大概的了解了,SWF文件也已经生成了,我们开始进入Flexpaper的使用的介绍. 本章中只演示F ...