April 2018
Intermediate to advanced
280 pages
8h 37m
English
Subscribing a user to a topic can be done by invoking the subscribe function of the SNS client object and passing the type of protocol, email or SMS, the topic ARN, and the endpoint address of the subscriber, which could be a phone number or email address, depending on the protocol used:
# Add an email address subscriptionsns_client.subscribe( TopicArn=topic_arn, Protocol='email', Endpoint='manoj.hirway@packtpub.com' # email address of the recipient)