Echo a string from ebextension script

梦想的初衷 提交于 2020-01-25 08:49:48

问题


I have a Windows instance of aws Elastic Beanstalk. I want to echo a text from the script inside .ebextensions folder and be able to see it in the deployment logs. Here is what I have:

container_commands:
  0100_execute_only_in_dev:
    command: echo "The_man_in_the_high_castle" 

The deployment is successful but when I requested logs for the EC2 instance, there is no text echo'ed.

What is the correct way?


回答1:


files:
  "C:\\Program Files\\Amazon\\ElasticBeanstalk\\config\\taillogs.d\\cfn-init-cmd.conf" :
    content: |
      c:\cfn\log\cfn-init-cmd.log
container_commands:
  0109_cmd:
    command: "echo show this: %My_Env%"

In the end, the above worked for me.

This answer https://stackoverflow.com/a/37189606/192727 helped a lot



来源:https://stackoverflow.com/questions/59094560/echo-a-string-from-ebextension-script

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!