shell - AWS 在单行命令中配置
问题描述
我正在尝试使用 Ansible 配置我的 AWS 账户,并且据我所知它需要在一行上(除非有一种方法可以在 Windows 命令中以编程方式按下“ENTER”)。
有没有办法做到这一点?
解决方案
aws configure
我们也可以交互地设置值,但是我们aws configure set
可以直接设置值。
概要 aws configure set varname value [--profile profile-name]
OPTIONS
varname (string) The name of the config value to set.
value (string) The value to set.
例如。
aws configure --profile myprofile set region us-east-1
aws configure --profile myprofile set aws_access_key_id XXXXXXXXXXX
aws configure --profile myprofile set aws_secret_access_key YYYYYYYY
或者,您也可以使用。
aws configure set profile.myprofile.region us-east-1
aws configure set profile.myprofile.aws_access_key_id XXXXXXXXXXX
aws configure set profile.myprofile.aws_secret_access_key YYYYYYYY
推荐阅读
- python - Plotly Drop Downs,输入到函数
- c# - 发出工厂方法
- visual-studio - Visual Studio 将 :1 添加到标题
- atom-editor - 无法在 Atom 中安装 platformio-ide-terminal
- php - HTML 中的多语言 PHP 内联替换([en]...[/en] 等)
- kotlin - 如何“android 媒体播放器”(Kotlin)
- java - JAXB 将内存大小 XML 减少为 Object
- wso2 - 如何在容器环境中更改 WSO2 API Manager 3.1.0 中的日志级别?
- sql - 从开始日期到结束日期的每个日期的行
- html - 如何为特定文件夹编写异常