Amazon web services 如何回显当前aws配置配置

Amazon web services 如何回显当前aws配置配置,amazon-web-services,aws-cli,Amazon Web Services,Aws Cli,我正在看这篇文章: 我只想回显当前的aws cli配置。运行aws configure将提示输入新信息,我只想回显默认信息 上面的文章说要使用aws configure get,但这会产生: $ aws configure get usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters] To see help text, you can run: aws

我正在看这篇文章:

我只想回显当前的aws cli配置。运行
aws configure
将提示输入新信息,我只想回显默认信息

上面的文章说要使用
aws configure get
,但这会产生:

$ aws configure get 
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:

  aws help
  aws <command> help
  aws <command> <subcommand> help
aws: error: too few arguments
$aws配置获取
用法:aws[选项][…][参数]
要查看帮助文本,您可以运行:
aws帮助
aws帮助
aws帮助
aws:错误:参数太少

最后,我只是尝试在
~/.aws/config
文件中对信息进行cat,但我想aws cli可能引用了另一个文件,因此需要考虑到这一点。我还希望能够在~/.aws/credentials中回显信息,作为旁白。

aws configure get
用于从配置中获取单个参数

您要查找的文件有两个可能的位置;在
$HOME
中或在指定的位置


通过参数扩展,您可以使用
cat“${AWS\u-CONFIG\u-FILE-$HOME}/.AWS/CONFIG”
cat“${AWS\u-SHARED\u-CREDENTIALS\u-FILE-$HOME}/.AWS/CREDENTIALS”
可靠地访问内容。

为了使用
AWS-configure-get
检索存储在配置文件中的值,您还需要使用varname,例如

aws configure get aws_access_key_id

aws configure get aws_secret_access_key