「AWS」入门安装aws cli
cli,即Command Line Interface,是aws服务常用的命令工具
AWS官网地址
- 环境:Python
- 安装
安装起来只需要一条命令:
pip install awscli
执行完成之后,输入aws
,输出如下,则说明安装成功了:
$ aws
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:aws helpaws <command> helpaws <command> <subcommand> help
aws: error: the following arguments are required: command
- 查看支持的命令,其中的
AVAILABLE SERVICES
便是支持的命令,内容过多,只罗列了部分
$ aws help
NAMEaws -DESCRIPTIONThe AWS Command Line Interface is a unified tool to manage your AWSservices.SYNOPSISaws [options] <command> <subcommand> [parameters]Use aws command help for information on a specific command. Use awshelp topics to view a list of available help topics. The synopsis foreach command shows its parameters and their usage. Optional parametersare shown in square brackets.
AVAILABLE SERVICESo acmo acm-pcao alexaforbusinesso amplifyo apigatewayo apigatewaymanagementapio apigatewayv2o application-autoscalingo appmesho appstreamo appsynco athenao autoscalingo autoscaling-planso backupo batcho budgetso ceo chimeo cloud9o clouddirectoryo cloudformationo cloudfronto cloudhsmo cloudhsmv2o cloudsearch
- 配置
其中有一个子命令configure
,是用来配置aws cli的。aws cli访问的都是 aws 服务,而每个服务都是需要身份验证的,所以在使用之前,需要先配置身份信息。
同样,先查看configure
的说明:
$ aws configure help
NAMEconfigure -DESCRIPTIONConfigure AWS CLI options. If this command is run with no arguments,you will be prompted for configuration values such as your AWS AccessKey Id and you AWS Secret Access Key. You can configure a named pro-file using the --profile argument. If your config file does not exist(the default location is ~/.aws/config), the AWS CLI will create it foryou. To keep an existing value, hit enter when prompted for the value.When you are prompted for information, the current value will be dis-played in [brackets]. If the config item has no value, it be displayedas [None]. Note that the configure command only work with values fromthe config file. It does not use any configuration values from envi-ronment variables or the IAM role.Note: the values you provide for the AWS Access Key ID and the AWSSecret Access Key will be written to the shared credentials file(~/.aws/credentials).CONFIGURATION VARIABLESThe following configuration variables are supported in the config file:o aws_access_key_id - The AWS access key part of your credentialso aws_secret_access_key - The AWS secret access key part of your cre-dentialso aws_session_token - The session token part of your credentials (ses-sion tokens only)o metadata_service_timeout - The number of seconds to wait until themetadata service request times out. This is used if you are using anIAM role to provide your credentials.o metadata_service_num_attempts - The number of attempts to try toretrieve credentials. If you know for certain you will be using anIAM role on an Amazon EC2 instance, you can set this value to ensureany intermittent failures are retried. By default this value is 1.For more information on configuration options, see Configuring the AWSCommand Line Interface in the AWS CLI User Guide.See 'aws help' for descriptions of global parameters.
其中有用的就是CONFIGURATION VARIABLES
,一般需要两个参数,aws_access_key_id
和aws_secrct_access_key
,这两个参数登陆AWS后从IAM获取,下面是配置方法,--profile
是给当前配置的身份起一个名字,这里起名叫dev
:
$ aws configure --profile dev
AWS Access Key ID [None]:
AWS Secret Access Key [None]:
Default region name [None]:
Default output format [None]:
执行后会让你输入以上几项,aws_access_key_id
和aws_secrct_access_key
照常填写,后面几项可以不填,也可按需填写。
这样,就配置完成了,使用dev
这个身份,就可以访问aws的各种服务了。
到这就算是入门了
「AWS」入门安装aws cli相关推荐
- 「超算」spack安装依赖包时进程缓慢的问题
实验室的服务器没有梯子www,如果再来一次我会选择搭梯子,而不是以下的解决方法.因为这样做,我安装了四个小时.Orz 我的解决方法 在本地添加建一个文件夹,作为spack本地的mirrors,命令如下 ...
- 「OS」Centos7安装Nvidia驱动
驱动安装环境 船新的Centos7系统,未装任何东西 参考链接 CentOS集成GTX-1080Ti显卡搭建深度学习环境全过程 centos 7 安装NVIDIA显卡驱动 CentOS7安装Nvidi ...
- 「Linux」VMware安装centos7(一)
1.点击:创建虚拟机 2.选择:自定义(高级),下一步 3.点击:下一步 4.选择:稍后安装操作系统,下一步 5.选择:操作系统和对应的版本,下一步 6.设置:虚拟机名称和安装位置,下一步 7.设置: ...
- linux五笔输入法制作_「简记」 Linux安装五笔输入法,包含arch和debian系
说明 自己的笔记本已经全盘做成了Linux系统了,用着还好,苦于常用的五笔输入法在Arch下有点不太好装,参考wiki弄好了,这里简单记录下 这里使用ibus-rime 原因有二: ibus-rime ...
- 必看!Spark 进阶之路之「SparkSQL」入门概述 | 博文精选
作者 | Alice菌 责编 | Carol 来源 | CSDN 博客 封图 | CSDN付费下载于视觉中国 在之前的文章中,我们已经完成了对于Spark核心SparkCore的详细介绍.而今天想为为 ...
- 从零开始,教你如何安装、配置Python开发环境,Python入门安装教程,超级详细
近日,我鼓起勇气从头开始正儿八经地配置一个更轻量.更趁手的 Python 开发环境.经过一番折腾,我比较顺利地在 Windows 10 上配置了一个比较满意的 Python 环境: 安装稳定版本的 P ...
- 使用「Stream」进行IOS抓包
背景 在测试手机上的软件的时候,需要抓包时,我们需要连接电脑配置代理才可以抓包,现在使用「Stream」就可以直接在手机上抓包了 Stream Stream 面向对象为广大前端开发.客户端开发后端开发 ...
- aws linux 安装图形,linux – 用于安装AWS CLI工具的Bash脚本
我正在编写一个自动安装和配置AWS CLI工具的bash脚本.我可以安装AWS CLI工具,但无法配置它. 我的脚本是这样的: #!/bin/bash wget https://s3.amazonaw ...
- 在 macOS 上安装 AWS CLI
在 macOS 上安装 AWS CLI 在 macOS 上安装 AWS Command Line Interface (AWS CLI) 的推荐方法是使用捆绑安装程序.捆绑安装程序包含所有依赖项,并可 ...
最新文章
- python读取指定行的txt_【Python】读取txt文件,获取指定行中指定位置数据
- phpmyadmin登录报错crypt_random_string requires at least one symmetric cipher be loaded 解决方法
- BSGS扩展BSGS
- android后台如何动态添加图片,android – 如何从JSON数组动态地向ImageView添加图像...
- PLSQL Developer使用大全
- 我的世界java刷怪数量_Minecraft我的世界Java版18w16a更新发布
- opengl学习笔记(四)
- python模仿声音_5秒钟让python克隆别人的声音
- Roundcube Webmail跨站脚本漏洞(CVE-2015-5381 )
- 百年GE濒临破产,传奇霸业何以衰亡?
- PHP 身份证验证方法
- CLRC66301国产替代,国产首颗全协议NFC芯片,可兼容A卡,B卡,F卡,15693卡,KK量级出货。
- 零基础入门学习Python(21):魔法方法(1)构造和析构
- 国家电力项目思路总结
- 关于求矩阵主对角线元素之和及副对角线元素之和的问题
- Unity---Shader
- 病毒也遵循二八法则?超级传播者背后的科学道理
- 隐藏安卓平板状态栏,还你全面屏体验
- 训练时评估指标无变化,且预测值都一样
- 在html文件中url称之为什么,html+css网页设计复习题