No resource based policy error - Amazon Managed Service for Prometheus

No resource based policy error

When the log contains the following error

{ "workspaceId": "ws-efdc5b42-b051-11ec-b123-4567ac120002", "message": { "log": "Notify for alerts failed, AMP is not authorized to perform: SNS:Publish on resource: arn:aws:sns:us-west-2:12345:testSnsReceiver because no resource-based policy allows the SNS:Publish action" "level": "ERROR" }, "component": "alertmanager" }

This means that Amazon Managed Service for Prometheus does not have the permissions to submit the alert to the SNS topic specified.

Action to take

Validate that the access policy on your Amazon SNS topic grants Amazon Managed Service for Prometheus the ability to send SNS messages to the topic. You can validate the topic policy against the IAM policy simulator with the IAM policy simulator. Make sure that you have the required permissions and policies in your IAM role. To find out more about IAM permissions and policies, see IAM permissions and policies.