Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

beanstalk no log in cloudwatch

files:
  "/etc/awslogs/config/beanstalklogs.conf":
    mode: "000644"
    user: root
    group: root
    content: |
      [/var/log/eb-docker/containers/eb-current-app/stdouterr.log]
      log_group_name=/aws/elasticbeanstalk/EB-ENV-NAME/var/log/eb-docker/containers/eb-current-app/stdouterr.log
      log_stream_name={instance_id}
      file=/var/log/eb-docker/containers/eb-current-app/*stdouterr.log
      file_fingerprint_lines=1-20

commands:
  01_remove_eb_stream_config:
    command: 'rm /etc/awslogs/config/beanstalklogs.conf.bak'
  02_restart_log_agent:
    command: 'service awslogs restart'
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #beanstalk #log #cloudwatch
ADD COMMENT
Topic
Name
5+9 =