Python code to publish a message to AWS SNS

0 votes
Can I write a python code to publish a message to AWS SNS? Can somebody give me the code? Thank you!
Aug 21 in AWS by Dipti
30 views

1 answer to this question.

0 votes

Hey @Dipti, you could use something like this:

import boto3
sns = boto3.client('sns')
# Publish a simple message to the specified SNS topic
response = sns.publish(
    TopicArn='arn:aws:sns:region:0786589:my-topic-arn',   
    Message='Hello World',   
)

# Print out the response
print(response)
answered Aug 21 by Tara

Related Questions In AWS

0 votes
1 answer

How do I publish a message on topic? - AWS SNS

Hey @Harish, follow these steps: On the navigation ...READ MORE

answered Jul 25 in AWS by Arya
57 views
0 votes
1 answer

Notification to AWS SNS to insert a record insert into Mysql Rds table?

You can achieve "automatic" triggering by AWS Lambda or ...READ MORE

answered Oct 31, 2018 in AWS by Priyaj
• 56,900 points
421 views
0 votes
1 answer
0 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 56,900 points
218 views
+13 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,380 points
209 views
0 votes
1 answer