无法将Elastic Beanstalk日志输出到CloudWatch

时间:2017-04-21 22:12:33

标签: amazon-web-services elastic-beanstalk

我正在尝试使用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的任何配置设置。

1 个答案:

答案 0 :(得分: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:*:*"
      ]
    }   ] }