How to write SNS topic into CloudWatch log within AWS console?

Blk*_*lkc 3 amazon-web-services amazon-sns amazon-ses amazon-cloudwatch amazon-cloudwatchlogs

I set up an email address within SES and I added SNS topic to the notifications sections.

SES主题

I can then subscribe to the SNS topic via email and I will receive the notifications but is there an easy way for me to write these notifications into CloudWatch logs within the console?

Joh*_*ein 5

没有自动工具将这些信息导入日志。你可以:

  • 创建一个将数据写入 CloudWatch Logs 的 AWS Lambda 函数
  • 将 Lambda 函数订阅到 Amazon SNS 主题

这将是一个相当简单的函数编写,因为 SNS 通知将被传递到函数中。该函数将简单地调用 CloudWatch Logs 来存储信息。

但是,根据您的信息用例,它可能更好地存储在数据库中,以便可以轻松查询和访问。