【问题标题】:Can't output Elastic Beanstalk log to CloudWatch无法将 Elastic Beanstalk 日志输出到 CloudWatch
【发布时间】:2017-09-19 01:11:09
【问题描述】:

我正在尝试为在 Elastic Beanstalk 和 .NET Core 上使用的程序设置日志记录。我想将日志条目输出到 CloudWatch。我按照https://github.com/aws/aws-logging-dotnet 的指示进行操作。

我想知道我错过了什么。此页面看起来很相关:http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/AWSHowTo.cloudwatchlogs.html 它有一个用于配置 CloudWatch Logs 的屏幕截图。有谁知道如何访问该页面以配置 CloudWatch 日志?我在 Elastic Beanstalk 的任何配置设置中都找不到它。

【问题讨论】:

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


    【解决方案1】:

    通过添加此处文档中列出的正确 IAM 权限,我能够使日志记录工作:http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/AWSHowTo.cloudwatchlogs.html

    {   "Version": "2012-10-17",   "Statement": [
        {
          "Effect": "Allow",
          "Action": [
            "logs:CreateLogGroup",
            "logs:CreateLogStream",
            "logs:GetLogEvents",
            "logs:PutLogEvents",
            "logs:DescribeLogGroups",
            "logs:DescribeLogStreams",
            "logs:PutRetentionPolicy"
          ],
          "Resource": [
            "arn:aws:logs:us-west-2:*:*"
          ]
        }   ] }
    

    【讨论】:

      猜你喜欢
      • 2020-05-26
      • 2017-10-18
      • 2023-04-06
      • 2017-11-05
      • 2019-01-23
      • 2021-01-13
      • 1970-01-01
      • 2018-09-07
      • 2022-09-26
      相关资源
      最近更新 更多