简体   繁体   English

我如何在 lambdafunction aws 中列出所有登录组

[英]How i can list all log in a group in lambdafunction aws

I try with @aws-sdk.我尝试使用@aws-sdk。 I don't know what is function support to list logs.我不知道什么是 function 支持列出日志。

  1. Create and run StartQueryCommand: https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-cloudwatch-logs/classes/startquerycommand.html创建并运行 StartQueryCommand: https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-cloudwatch-logs/classes/startquerycommand.html
  2. Get queryId from above从上面获取queryId
  3. Create and run GetQueryResultsCommand with queryId finded: https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-cloudwatch-logs/classes/getqueryresultscommand.html创建并运行 GetQueryResultsCommand 并找到 queryId: https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-cloudwatch-logs/classes/getqueryresultscommand.html
  4. Result of step 3 have status.第 3 步的结果具有状态。 if status equal 'running' run again step 3 until status equal 'Complete'.如果状态等于“正在运行”,则再次运行第 3 步,直到状态等于“完成”。

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

相关问题 如何使用 boto3 列出 Cloudwatch 中的所有日志组 - How to list all the log group in Cloudwatch using boto3 如何在 VPC 中配置 AWS Lambda 以便能够登录到另一个 Cloudwatch 日志组? - How do I configure an AWS Lambda in a VPC to be able to log to another Cloudwatch log group? 如何通过 API 检索 AWS RDS 数据库实例中所有数据库的列表? - How can I retrieve the list of all databases in an AWS RDS DB instance via API? 在 cloudwatch 中创建日志组时,如何触发 lambda? - How can I trigger a lambda when a log group is created in cloudwatch? 如何替换 AWS Auto Scaling 组中的特定实例? - How can I replace a specific instance in an AWS Auto Scaling Group? 如何生成我的所有 IAM 角色以及在 AWS 上使用这些角色的服务的列表 - How can I generate a list of all my IAM roles and the services using those roles on AWS 如何列出所有公开的 AWS S3 对象? - How do I list all AWS S3 objects that are public? 如何在资源组中列出 AWS 实例 ID - How to list the AWS instance id in Resource group 如何在 Terraform 中通过标签获取所有 AWS Lambda - How can I get all AWS Lambdas by Tag in Terraform 我如何在 Bash 的 while 列表中处理 aws 区域 - How can I work on aws regions in a while list in Bash
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM