Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use Amazon Simple Notification service SNS with ruby [closed]

I need to to use Amazon Simple Notification Service from a ruby-based application, and have no idea where to start.

Do you have any recommendations on where to start?

like image 655
Psl Avatar asked Apr 17 '13 05:04

Psl


2 Answers

To start with Amazon services, Follow the steps :

  • Create account in Amazon AWS.
  • Navigate to SNS service and create topic
  • Install amazon aws sdk gem aws-sdk-ruby. and open irb
  • Here is sample code to invoke SNS services

    required "aws-sdk"
    
    Aws.config.update({region: 'your aws region',credentials:
    Aws::Credentials.new('aws access key', 'aws secret key')})
    
    c = Aws::SNS::Client.new(region: 'your aws region')
    
    c.operation_names #shows you list of operation you can do.
    
    c.publish({topic_arn: 'arn', message: "my message"})
    

Hope this would help you. Here are some more useful links :

  • http://docs.aws.amazon.com/sdkforruby/api/Aws/SNS.html
  • http://aws.amazon.com/sns/details/
like image 160
Anand Soni Avatar answered Oct 13 '22 12:10

Anand Soni


Check out the Amazon SDK for Ruby. SNS is one of the services supported.

like image 24
ianjs Avatar answered Oct 13 '22 12:10

ianjs