Shell AWS在单行命令中配置
我正在尝试使用Ansible配置我的AWS帐户,据我所知,它需要在一行上(除非有办法在Windows命令中按程序“ENTER”)Shell AWS在单行命令中配置,shell,amazon-web-services,command-line,amazon,Shell,Amazon Web Services,Command Line,Amazon,我正在尝试使用Ansible配置我的AWS帐户,据我所知,它需要在一行上(除非有办法在Windows命令中按程序“ENTER”) 有没有办法做到这一点?使用aws configure我们也可以交互设置值,但是使用aws configure set我们可以直接设置值 概要 aws配置设置变量名值[--配置文件名] 比如说 aws configure --profile myprofile set region us-east-1 aws configure --profile myprofile
有没有办法做到这一点?使用
aws configure
我们也可以交互设置值,但是使用aws configure set
我们可以直接设置值
概要
aws配置设置变量名值[--配置文件名]
比如说
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
为什么不让Ansible直接创建
.aws/config
和.aws/credentials
文件呢。这就是所有的aws configure
命令正在执行的操作。aws:error:参数太少
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