'How can I get the SNS topic ARN using the topic name to publish a SNS message in Python via Boto3?

Python

method to run query

def function(run_query)
   //topic = arn return from topic name
   topic.publish(message)
   pass

I am using the boto3 resource method. There are lot of examples of using boto3.client and limited example of sns method implementation using boto3 resource methods.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source