This is a simple tutorial for setting up AWS SNS with Rails 4. A few details on the implementation:
- Instead of saving a device_token as an attribute of Users, I save all SNS data and implementation with a separate model - SNSEndpoints.
- SNS is region specific. I'm using us-west-1 as most of our startup's users are on the west coast. You can use whatever region you like (or the default), just keep in mind your AWS has to be configured for the same region as your SNS app (which you determine during setup in the AWS web console.
Firstly, setup an AWS account. Also, create a fresh Rails 4 app. I'm using Ruby 2.1.2 and Rails 4.1.0.
-
Add the necessary gems to your Gemfile.
```ruby gem 'aws-sdk' ```
Then
bundle install
. -
Something