您正在尝试创建一个安装Cloudwatch代理的厨师食谱,我有类似这样的示例:
execute 'gexecutescripts' do
command 'sudo python ./awslogs-agent-setup.py --region us-east-1'
action :run
end
我得到以下输出:
Step 1 of 5: Installing pip ...DONE
Step 2 of 5: Downloading the latest CloudWatch Logs agent bits ... DONE
Step 3 of 5: Configuring AWS CLI ...
AWS Access Key ID [****************]:
Step 4 of 5: Configuring the CloudWatch Logs Agent ...
Path of log file to upload [/var/log/syslog]:
STDERR: EOF when reading a line
Traceback (most recent call last):
File "./awslogs-agent-setup.py", line 1144, in <module>
main()
File "./awslogs-agent-setup.py", line 1140, in main
setup.setup_artifacts()
File "./awslogs-agent-setup.py", line 705, in setup_artifacts
self.aws_logs_configure()
File "./awslogs-agent-setup.py", line 805, in aws_logs_configure
log_file_path = prompter.get_value(default_log_file_path, file_path_msg)
File "./awslogs-agent-setup.py", line 986, in get_value
response = input("%s [%s]: " % (prompt_text, current_value))
EOFError: EOF when reading a line
如何从配方中传递访问密钥,密钥和其他值?
答案 0 :(得分:0)
设置配置文件的访问键对于Chef配方来说有点麻烦,所以最好将IAM角色赋予EC2实例。
有关详细信息,请参阅以下文档: http://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/QuickStartEC2Instance.html