- Newest
- Most votes
- Most comments
Change the TopicArn section in your template from:
TopicArn: ResourceValue: Value: !Ref SNSPublishMessageTopicARN
to:
TopicArn: StaticValue: Values: - !Ref SNSPublishMessageTopicARN
This modification uses StaticValue instead of ResourceValue and provides the SNS topic ARN as a static value. The Values key is an array, which is why the ARN is nested under it.
Also, ensure that the SNSPublishMessageTopicARN is properly defined elsewhere in your template or passed as a parameter.
This change should resolve the validation error you're encountering. The AWS-PublishSNSNotification remediation action expects the TopicArn to be provided as a static value rather than a resource value.
Remember to update the IAM role (SNSRole in your template) to have the necessary permissions to publish to the SNS topic. The role should have a policy that allows the "sns:Publish" action on the specified SNS topic.
Sources
How to configure existing AWS Config rule to send to SNS ? | AWS re:Post
SNS tOPIC does not send message to my AWS Chatbot | AWS re:Post
Relevant content
- AWS OFFICIALUpdated 2 years ago
