我需要从基于 ruby 的应用程序中使用 Amazon Simple Notification Service,但不知道从哪里开始。
你对从哪里开始有什么建议吗?
我需要从基于 ruby 的应用程序中使用 Amazon Simple Notification Service,但不知道从哪里开始。
你对从哪里开始有什么建议吗?
要开始使用亚马逊服务,请按照以下步骤操作:
这是调用 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"})
希望这会对你有所帮助。这里有一些更有用的链接:
查看适用于 Ruby 的 Amazon 开发工具包。SNS 是支持的服务之一。