|
|
|
|
|
by jcims
2061 days ago
|
|
Kafka and SNS only conceptually intersect, SNS is more for intra-service and endpoint notification at huge scale (millions of subscribers) and is directly integrated into a variety of AWS services (e.g. S3 event notifications). You can set up a topic, subscribe a customer via SMS and send a message in just a few lines of python: $ python3
>>> import boto3
>>> sns=boto3.client('sns')
>>> sns.create_topic(Name='DopeService')
>>> sns.subscribe(TopicArn='arn:aws:sns:us-east-1:xxxxxxxxxxxx:DopeService',Protocol='sms',Endpoint='+18008675309')
>>> ...<repeat for other SMS #'s>...
>>> sns.publish(TopicArn='arn:aws:sns:us-east-1:xxxxxxxxxxxx:DopeService',Message='sup')
If you're a masochist you can have Amazon notify everyone on the topic every time someone uploads to your bucket >>> sns.set_topic_attributes(TopicArn='arn:aws:sns:us-east-1:xxxxxxxxxxxx:DopeService',AttributeName='Policy',AttributeValue='<policy>')
>>> s3.put_bucket_notification_configuration(Bucket='dopebucket',NotificationConfiguration={<notification config>})
You send directly to HTTP/HTTPS service endpoints, other SNS topics, Lambdas, SQS queues and mobile app push notifications. SNS is more about signaling than a raw message pipe. Relative to Kafka it's basically apples and oranges. |
|