Python: AWS – Send SNS message is fairly easy

I am experimenting with Amazon SNS (Simple notification service) and here is extremely simple example.

You just create a topic, attach a subscriber under AWS Console and run this code in Python (lambda, or your local instance with boto3)

import boto3
client = boto3.client('sns')
arn = 'arn:aws:sns:YOUR_ARN_ID:Enigma14'
client.publish(TopicArn=arn, Message='test')