安装

在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. Linux常用命令——持续更新(2018-05-09)

    此命令默认是在centos环境下执行,除非特殊标明. 1.查看ip: ifconfig 2.创建指定用户并分配到某个组:创建用户user并分配到root组 useradd -g root user 3 ...

  2. 在react jsx中,为什么使用箭头函数和bind容易出现问题

    在之前的文章中,已经说明如何避免在react jsx中使用箭头函数和bind(https://medium.freecodecamp.o... 但是没有提供一个清晰的demo展示为什么要这样做. 现在 ...

  3. Codeforces Round #373 (Div. 2) Anatoly and Cockroaches —— 贪心

    题目链接:http://codeforces.com/contest/719/problem/B B. Anatoly and Cockroaches time limit per test 1 se ...

  4. JavaSE基础练习IO,字符串,循环

    import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.F ...

  5. Tensorflow深度学习之十二:基础图像处理之二

    Tensorflow深度学习之十二:基础图像处理之二 from:https://blog.csdn.net/davincil/article/details/76598474   首先放出原始图像: ...

  6. vim 使用、设置笔记

    一.设置.vimrc( windows下通常为_vimrc) 1.设置vim中tab的缩进 set ts=4  (注:ts是tabstop的缩写,设TAB宽4个空格) set expandtab (注 ...

  7. Batch Normalization层

    Batch Normalization的加速作用体现在两个方面:一是归一化了每层和每维度的scale,所以可以整体使用一个较高的学习率,而不必像以前那样迁就小scale的维度:二是归一化后使得更多的权 ...

  8. bzoj1799同类分布——数位DP

    题目:https://www.lydsy.com/JudgeOnline/problem.php?id=1799 数位DP. 1.循环方法 预处理出每个位数上,和为某个数,模某个数余某个数的所有情况: ...

  9. C/C++获取操作系统、CPU、内存信息(windows和linux)

    有时候需要在工程里面获取一些系统或者硬件的信息,比如系统版本,cpu,内存,显卡,硬盘等,作为后续软件功能判断的依据,甚至参与性能算法自适应建模 Windows 操作系统和内存信息在windows下通 ...

  10. 《The challenge of realistic music generation: modelling raw audio at scale》论文阅读笔记

    The challenge of realistic music generation: modelling raw audio at scale 作者:Deep  mind三位大神 出处:NIPS ...