[英]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
}
]
}
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.