I need to to use Amazon Simple Notification Service from a ruby-based application, and have no idea where to start.
我需要从基于ruby的应用程序中使用Amazon Simple Notification Service,并且不知道从哪里开始。
Do you have any recommendations on where to start?
你有什么建议从哪里开始?
2 个解决方案
#1
9
To start with Amazon services, Follow the steps :
要开始使用Amazon服务,请执行以下步骤:
- Create account in Amazon AWS.
- 在Amazon AWS中创建帐户。
- Navigate to SNS service and create topic
- 导航到SNS服务并创建主题
- Install amazon aws sdk gem aws-sdk-ruby. and open irb
- 安装amazon aws sdk gem aws-sdk-ruby。并打开irb
-
Here is sample code to invoke SNS services
以下是调用SNS服务的示例代码
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://docs.aws.amazon.com/sdkforruby/api/Aws/SNS.html
- http://aws.amazon.com/sns/details/
- http://aws.amazon.com/sns/details/
#2
1
Check out the Amazon SDK for Ruby. SNS is one of the services supported.
查看Amazon SDK for Ruby。 SNS是支持的服务之一。
#1
9
To start with Amazon services, Follow the steps :
要开始使用Amazon服务,请执行以下步骤:
- Create account in Amazon AWS.
- 在Amazon AWS中创建帐户。
- Navigate to SNS service and create topic
- 导航到SNS服务并创建主题
- Install amazon aws sdk gem aws-sdk-ruby. and open irb
- 安装amazon aws sdk gem aws-sdk-ruby。并打开irb
-
Here is sample code to invoke SNS services
以下是调用SNS服务的示例代码
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://docs.aws.amazon.com/sdkforruby/api/Aws/SNS.html
- http://aws.amazon.com/sns/details/
- http://aws.amazon.com/sns/details/
#2
1
Check out the Amazon SDK for Ruby. SNS is one of the services supported.
查看Amazon SDK for Ruby。 SNS是支持的服务之一。