【问题标题】:Echo a string from ebextension script从 ebextension 脚本回显字符串
【发布时间】:2020-03-24 10:44:24
【问题描述】:

我有一个 AWS Elastic Beanstalk 的 Windows 实例。我想从 .ebextensions 文件夹内的脚本中回显一个文本,并能够在部署日志中看到它。这是我所拥有的:

container_commands:
  0100_execute_only_in_dev:
    command: echo "The_man_in_the_high_castle" 

部署成功,但是当我请求 EC2 实例的日志时,没有回显文本。

正确的方法是什么?

【问题讨论】:

    标签: amazon-web-services amazon-elastic-beanstalk


    【解决方案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%"
    

    最后,以上方法对我有用。

    这个回答https://stackoverflow.com/a/37189606/192727帮了大忙

    【讨论】:

      猜你喜欢
      • 2017-08-06
      • 2017-12-13
      • 1970-01-01
      • 2011-02-26
      • 1970-01-01
      • 2020-04-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多