Search code examples
amazon-web-servicesamazon-snsamazon-cloudwatchamazon-sesamazon-cloudwatchlogs

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


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

SES topics

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?


Solution

  • There is no automated facility to direct that information into logs. You could:

    • Create an AWS Lambda function that writes the data to CloudWatch Logs
    • Subscribe the Lambda function to the Amazon SNS topic

    This would be a fairly simple function to write, since the SNS notification would be passed into the function. The function would simply call CloudWatch Logs to store the information.

    However, depending upon your use-case for the information, it might be better stored in a database so that it can be easily queried and accessed.