The `sns` metricset of aws module allows you to monitor your AWS SNS topic. `sns` metricset fetches a set of values from
https://docs.aws.amazon.com/sns/latest/dg/sns-monitoring-using-cloudwatch.html#SNS_ViewMetrics[Amazon SNS Metrics].
CloudWatch metrics for Amazon SNS topics are automatically collected and pushed to CloudWatch every five minutes.

[float]
=== AWS Permissions
Some specific AWS permissions are required for IAM user to collect AWS SNS metrics.
----
cloudwatch:GetMetricData
cloudwatch:ListMetrics
ec2:DescribeRegions
sns:ListTopics
sts:GetCallerIdentity
iam:ListAccountAliases
----

[float]
=== Dashboard

The `aws sns` metricset comes with a predefined dashboard. For example:

image::./images/metricbeat-aws-sns-overview.png[]

[float]
=== Configuration example
[source,yaml]
----
- module: aws
  period: 300s
  metricsets:
    - sns
  # This module uses the aws cloudwatch metricset, all
  # the options for this metricset are also available here.
----

[float]
=== Metrics
Please see more details for each metric in
https://docs.aws.amazon.com/sns/latest/dg/sns-monitoring-using-cloudwatch.html#SNS_ViewMetrics[CloudWatch SNS Metrics].

|===
|Metric Name|Statistic Method
|NumberOfMessagesPublished | Sum
|NumberOfNotificationsDelivered | Sum
|NumberOfNotificationsFailed | Sum
|NumberOfNotificationsFilteredOut | Sum
|NumberOfNotificationsFilteredOut-InvalidAttributes | Sum
|NumberOfNotificationsFilteredOut-NoMessageAttributes | Sum
|NumberOfNotificationsRedrivenToDlq | Sum
|NumberOfNotificationsFailedToRedriveToDlq | Sum
|PublishSize | Average
|SMSMonthToDateSpentUSD | Sum
|SMSSuccessRate | Average
|===
