Anybody get an example for setting up cloudwatch l...
# aws
r
Anybody get an example for setting up cloudwatch logging for SNS success and failure delivery status?
AWS provifrt is based on terraform you can always lookup for terraform examples and convert them https://github.com/cloudposse/terraform-aws-sns-cloudwatch-sns-alarms
r
Thanks Jan, will take a look.
I ended up create the IAM role and specified the roles as part of SNS topic creation like this in golang: topic, err := sns.NewTopic(ctx, snsTopicName, &sns.TopicArgs{ Policy: notificationPolicy, SqsFailureFeedbackRoleArn: snsFeedbackRole.Arn, SqsSuccessFeedbackRoleArn: snsFeedbackRole.Arn, }) The IAM role with this policy: { "Version": "2012-10-17", "Statement": [{ "Effect": "Allow", "Action": [ "logs:CreateLogGroup", "logs:CreateLogStream", "logs:PutLogEvents", "logs:PutMetricFilter", "logs:PutRetentionPolicy" ], "Resource": "*" }] }
Once I did that, the SNS delivery status logs shows up in the cloudwatch