安装

在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. mysql分页查询-limit

    分页查询的sql: select * from table limit 4,10; 4表示查询的索引,索引是从0开始,4表示从第五条数据开始查询,10表示要查询多少条数据,10表示查询十条数据 如果从 ...

  2. [自动化平台系列] - 初次使用 Macaca-前端自动化测试(3)

    1. 如果是一个列表页面,当要触发编辑页面是如何做的呢?其实我测试只要点击第一条数据去编辑就好啦!如果页面结构如下 <li class="myatc-li"> < ...

  3. 报错:'Navigator is deprecated and has been removed from this package. It can now be installed

    报错:'Navigator is deprecated and has been removed from this package. It can now be installed ' +     ...

  4. fatal error C1902: 程序数据库管理器不匹配;请检查安装解决

    http://blog.sina.com.cn/s/blog_9f4bc8e301015uhz.html 1.错误提示:VS2008编译错误fatal error C1902: 程序数据库管理器不匹配 ...

  5. linux系统配置之bash shell的配置(centos)

    linux系统开机启动过程的最后阶段会由init进程根据启动方案(运行级:0-6)启动许多基本的服务程序,为用户提供各种各样的服务.在启动这些服务的最后会启动一个为用户提供操作环境的服务,用户就是通过 ...

  6. BigDecimal 实际测试结果

    package com.zzzy; import java.math.BigDecimal; public class Test { public static void main(String[] ...

  7. 记一次关于return的错误

     有时候瞎JB程序,调一天东改西改,都发现不了错:到最后弄出来发现就是那样一个SB错误,真不知道该笑还是该哭. 这个if语句中的return,如果加了那么判断了if语句成立后,下面就不再执行了.   ...

  8. codevs 3269 混合背包(复习混合背包)

    传送门 [题目大意]给出物品的数量.-1为无限个. [思路]混合背包.... [code] #include<iostream> #include<cstdio> #inclu ...

  9. 激活层和pooling的作用

    激活层: 激活函数其中一个重要的作用是加入非线性因素的,将特征映射到高维的非线性区间进行解释,解决线性模型所不能解决的问题 pooling层: 1. invariance(不变性),这种不变性包括tr ...

  10. C++之全局函数和成员函数互相转换

    解析:成员函数会用this指针自动隐藏第一个操作数(左操作数) 1.把全局函数转化成成员函数,通过this指针隐藏左操作数. Test add(Test &t1,Test &t2)  ...