aws cli command line interface的安装与使用

摘要:
在centos中安装awscli。安装取决于python。首先安装python,然后使用以下命令执行yu_yuminstallwgetwgethttps://bootstrap.pypa.io/get-pip.pypythonget-pip.pypipinstallawscli在使用配置之前,您需要配置自己的keyID和AccessKey,执行aws-configure,并按如下步骤进行配置:AWSAccessKe

安装

在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的安装与使用》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇Delphi 10.3.3最新消息Zookeeper 3.5.7搭建(启用Kerberos)下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

uirecorder的安装和使用

uirecorder安装: 安装node8.x版本,并安装执行下面两条命令安装uirecordernode下载地址:https://nodejs.org/en/download/npm install -g cnpm --registry=https://registry.npm.taobao.orgcnpm install uirecorder moch...

elasticsearc进行全文索引高亮显示

首先使用composer安装扩展 composer require elasticsearch/elasticsearch composer require nunomaduro/collision 开启你的 elasticsearch  与 kibana HTML代码  使用vue进行数据渲染 <!doctype html> <htm...

python爬虫学习笔记(二十七)-Splash的使用

1. Splash介绍 Splash是一个JavaScript渲染服务,是一个带有HTTP API的轻量级浏览器,同时它对接了Python中的Twisted和QT库。利用它,我们同样可以实现动态渲染页面的抓取 2. 安装 2.1 安装docker 2.2 拉取镜像 docker pull scrapinghub/splash 2.3 用docker运行s...

Nginx https加密以及nginx日志配置与管理

Nginx https加密以及nginx日志配置与管理使用Nginx的优点Nginx作为WEB服务器,Nginx处理静态文件、索引文件、自动索引的效率非常高。Nginx作为代理服务器,Nginx可以实现无缓存的反向代理,提高网站的性能Nginx作为负载均衡服务器,内部可以支持PHP、也可以支持HTTP代理服务器对外进行服务,同时还支持简单的容错和利用算法进...

svn

SVN Unable to connect to a repository at URL (2012-10-16 15:48:56)转载▼ 标签: svn 缓存 杂谈 分类: SVN 背景: 1.SVN服务器:VisualSVN-Server-2.5.5; 2.SVN客户端:TortoiseSVN-1.7.6.22632-x64-svn...

prometheus学习笔记(1)-mac单机版环境搭建

注:以下所有环境均为mac笔记本 一、安装prometheus brew install prometheus 安装完后,默认的安装路径为: /usr/local/Cellar/prometheus/2.16.0/ 同时还会生成一个默认配置文件:/usr/local/etc/prometheus.yml global: scrape_interva...