安装

在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. 在react里面使用jquery插件

    在react里面使用jquery插件 背景: 虽然现在react,vue等框架开启了前端开发的新篇章, 但对于一些比较复杂的页面,比如想在项目里面生成 组织架构图,人员汇报关系等还是需要用到之前的 j ...

  2. Ubuntu下声卡驱动解决方法alsa

    一.首先介绍一下什么是ALSA : Advanced Linux Sound Architecture 的简称为 ALSA ,译成中文的意思是先进的Linux声音架构(这是google翻译的):一谈到 ...

  3. kernel中对文件的读写【学习笔记】【原创】

    /*1. 头文件 */ #include <linux/init.h> #include <linux/module.h> #include <linux/modulep ...

  4. python 实用pickle序列化

    存储数据结构到一个文件中称为序列化.相json这样的格式需要定制的序列化数据的转换器.python提供了pickle模块以特殊的二进制格式保存和恢复数据对象. 还记得json解析datetime对象时 ...

  5. Redis使用经验之谈

    应用场景 保存用户喜欢的商品信息. 类型: Hash, key: usr:${type_id}:${version_id}:${user_id}:${warehouse_id}, field: ${s ...

  6. codeforces 463B Caisa and Pylons 解题报告

    题目链接:http://codeforces.com/problemset/problem/463/B 题目意思:Caisa 站在 0 pylon 并且只有 0 energy,他需要依次跳过1 pyl ...

  7. html5--5-1 了解canvas元素

    html5--5-1 了解canvas元素 学习要点 如何在HTML5文档中添加canvas元素 canvas的属性 了解canvas坐标系 了解script元素 绘制一条直线(准确的说是线段) 什么 ...

  8. JSTL取整、读取数组、字符串连接

    以通过formatNumber去掉小数. <fmt:formatNumber type='number' value='${(tv.timeLong-tv.timeLong%60)/60 }' ...

  9. python中通过xlwt、xlrd和xlutils操作xls

    xlwt模块用于在内存中生成一个xls/xlsx对象,增加表格数据,并把内存中的xls对象保存为本地磁盘xls文件; xlrd模块用于把本地xls文件加载到内存中,可以读取xls文件的表格数据,查询x ...

  10. CF-805D

    D. Minimum number of steps time limit per test 1 second memory limit per test 256 megabytes input st ...