简体   繁体   English

如何删除 AWS CloudWatch 日志组中的订阅

[英]How to remove subscription in AWS CloudWatch Log Groups

I am not able to delete these subscriptions attached to the CloudWatch Logs Groups.我无法删除这些附加到 CloudWatch Logs 组的订阅。

截屏

These subscriptions are created by CloudFormation stack via Serverless Framework.这些订阅由 CloudFormation 堆栈通过无服务器框架创建。 However, when I finished testing and deployed to the template, there was a permission error during the cleanup.但是,当我完成测试并部署到模板时,在清理过程中出现了权限错误。 Hence, these subscriptions became dangled and I am not able to locate it.因此,这些订阅变得悬而未决,我无法找到它。

Tried with CLI and seems no relevant info regarding that.使用 CLI 尝试过,似乎没有相关信息。

$ aws logs describe-log-groups --log-group-name-prefix yyy
{
    "logGroups": [
        {
            "logGroupName": "yyy",
            "creationTime": 1555604143719,
            "retentionInDays": 1,
            "metricFilterCount": 0,
            "arn": "arn:aws:logs:us-east-1:xxx:log-group:yyy:*",
            "storedBytes": 167385869
        }
    ]
}

Select the Log Group using the radio button on the left of the Log Group name.使用日志组名称左侧的单选按钮选择日志组。 Then click Actions, Remove Subscription Filter.然后单击操作、删除订阅过滤器。

删除订阅过滤器

Via CLI is listed in AWS document => This link通过 CLI 在 AWS 文档中列出 => 此链接

Via Console UI -> This capture通过控制台 UI ->此捕获

As you created the subscription with cloudformation stack via serverless, manually removing the subscription filter as jarmod is not a best practice.当您通过无服务器使用 cloudformation 堆栈创建订阅时,手动删除订阅过滤器作为jarmod不是最佳实践。 What you should do is remove the cloudwatchLog event from the lambda functions and deploy, it should remove the subscriptions.您应该做的是从 lambda 函数中删除 cloudwatchLog 事件并进行部署,它应该删除订阅。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用 CloudFormation 为多个日志组创建 AWS CloudWatch 订阅过滤器 - How to create AWS CloudWatch Subscription Filters for multiple Log Groups using CloudFormation AWS Cloudwatch Insights 如何使用多个日志组进行查询 - AWS Cloudwatch Insights how to query using multiple log groups 错误 aws_cloudwatch_log_subscription_filter 到 AWS Lambda 和 Terraform - ERROR aws_cloudwatch_log_subscription_filter to AWS Lambda with Terraform 摄取的 AWS CloudWatch 差异日志数据和日志组的实际大小 - AWS CloudWatch difference log data ingested and actual size of Log Groups 没有任何过滤模式的 AWS CLI cloudwatch 日志订阅 - AWS CLI cloudwatch log subscription without any filter pattern AWS Lambda CloudWatch订阅 - AWS lambda cloudwatch subscription 为什么 AWS CloudWatch 加密日志组会破坏 session 管理器? - Why does AWS CloudWatch encrypted log groups breaks session manager? AWS Cloudwatch Insights:使用多个日志组进行查询 - AWS Cloudwatch Insights: query using multiple log groups 如何递归删除AWS Cloudwatch日志流? - How to delete AWS Cloudwatch log streams recursively? 如何拆分 AWS CloudWatch 日志流? - How to split AWS CloudWatch Log streams?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM