Search code examples
amazon-web-servicesloggingsmsamazon-snsamazon-cloudwatchlogs

Where are the SNS/SMS logs? Cloudwatch empty


Context: I use Amazon AWS, SNS service, to manually send SMS as a trial before I do any integration by code.

I want to log the SMS reponses (the JSONs that appear here: http://docs.aws.amazon.com/sns/latest/dg/sms_stats_cloudwatch.html ) at some place.

Investigation done:

It seems I had to create an IAM role. I did it following the steps in the page, in the section "Viewing CloudWatch Logs". The role has been created. The policy for the role contains the following actions:

"Action": [
    "logs:CreateLogGroup",
    "logs:CreateLogStream",
    "logs:PutLogEvents",
    "logs:PutMetricFilter",
    "logs:PutRetentionPolicy"
],

I have set the "Default percentage of success to sample" to the 100% so it should log all errors and successes...

And now what? I have sent a couple of SMSs, I go to the Cloudwatch / Logs and all is empty.

Questions:

  • Where are the logs?
  • Do I have to do anything else with the IAM to get that logged?
  • Do I have to do anything in the Cloudwatch section?
  • Where is it supposed I should be able to see the logs?

I've spent 6+ hours with this and I want to think it is some silly point I'm missing. It can't be so complicated.

The overall question is Where are the SNS/SMS logs and how do I activate them?


Solution

  • I don't know if your AIM configuration is good or wrong, I would need to check your configuration in order to tell you that, but if you want to know where the SNS logs are, in my case I can find them doing:

    • Go to CloudWatch
    • From the left menu, select Logs
    • You will see the list of your logs, search for the name of your SNS, in my case is something like sns/us-west-2/<account-id>/app/APNS/<endpoint-name>
    • After you click on that name, you will find all your logs

    Image attached: enter image description here