配置 aws cli_AWS CLI教程–如何安装,配置和使用AWS CLI了解您的资源环境

配置 aws cli

How to get exactly the account and environment information you need to manage your AWS account using just the AWS CLI

如何仅使用AWS CLI准确获取管理AWS账户所需的账户和环境信息

Installing the AWS CLI is actually quite simple. The best way to get it done is to head over to the AWS installation guide and follow instructions for your OS.

实际上,安装AWS CLI非常简单。 最好的方法是转到AWS安装指南并按照您的操作系统的说明进行操作。

Right now they're pushing us towards version 2 of the CLI and I haven't seen any reason not to go along. I'm working with Linux so that's where I'd head next.

目前,他们正在将我们推向CLI的第二版,而且我还没有任何不接受的理由。 我正在使用Linux,所以接下来是我要去的地方。

To get it done, I'll paste the curl command from the Amazon page into my Linux shell that'll download the package and write it to a local zip file, which I'll then unzip. That'll create a new directory called aws that'll contain a install script, which I can run using sudo to get admin privileges. I'll run aws --version to confirm everything worked as it was supposed to.

为此,我将从Amazon页面粘贴curl命令到Linux外壳程序中,该外壳程序将下载该程序包并将其写入本地zip文件,然后将其解压缩。 这将创建一个名为aws的新目录,其中将包含一个安装脚本,我可以使用sudo运行该脚本以获取管理员权限。 我将运行aws --version来确认一切均按预期进行。

curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
ls aws
sudo ./aws/install
aws --version

The next step will require one quick trip to the management console. You see, to authenticate the CLI to your account you'll need a valid access key. Now, the CLI has a "create-access-key" command that'll generate a new key, but that's only possible once I've authenticated. I'm sure you understand the problem with that.

下一步将需要快速访问管理控制台。 您会看到,要通过CLI对您的帐户进行身份验证,您将需要一个有效的访问密钥。 现在,CLI具有一个“ create-access-key”命令,该命令将生成一个新密钥,但是只有在我通过身份验证后才可能。 我敢肯定,您了解问题所在。

You access the security credentials page from the drop-down account menu at the top of any page on the console. With your credentials in hand, you can run "aws configure." You'll be prompted to enter your access key ID and the secret key itself. If you like you can then choose a default AWS region and output fo

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值