如何在部署后获取container_commands的输出?

我的Elastic Beanstalk容器使用container_commands运行脚本来为每个部署上的数据库打补丁。

我使用在Elastic Beanstalk API上调用UpdateEnvironment的自制脚本来运行部署。

问题是,我没有看到我的container_commands的输出,这在部署过程中非常可怕。 我可以判断出错的唯一方法是当一个命令返回一个非零值时:在这种情况下, DescribeEvents将报告一个问题。 但是,我仍然无法获得命令的实际输出。

部署完成后,如何获取我的container_commands输出?

理想情况下,与Elastic Beanstalk API,但任何其他编程方式将是好的!

不是控制台视图,但是(现在)在日志中可见。

.ebextensions / 10-log.config

 container_commands: 05-whoami: command: "whoami" 

/var/log/cfn-init.log部署后

 2014-07-01 22:08:10,695 [DEBUG] Running command 05-whoami 2014-07-01 22:08:10,695 [DEBUG] Generating defaults for command 05-whoami 2014-07-01 22:08:11,014 [DEBUG] Defaults script for 05-whoami output: {"env":{"EB_REQUEST_ID":"110d0932-016c-11e4-9f71-3fe967c5cd60", [long list of params omitted for brevity]} 2014-07-01 22:08:11,015 [DEBUG] No test for command 05-whoami 2014-07-01 22:08:11,050 [INFO] Command 05-whoami succeeded 2014-07-01 22:08:11,050 [DEBUG] Command 05-whoami output: root 

AWS支持的回复:

查看输出的最简单方法是使用>>将命令或脚本输出传输到文件。 不幸的是,没有一个现场控制台可以查看来显示进程的生活。

所以不幸的是,还没有办法做到这一点。