require 'aws-sdk' # AWS.config(access_key_id: 'xxx', secret_access_key: 'yyy', region: 'us-east-1') class SnsAndroidPush def initialize(sns) @client = sns.client end def notify(endpoint_arn, message) @client.publish( target_arn: endpoint_arn, message: message ) end def create_application(name) res = @client.create_platform_application( name: name, platform: 'GCM', attributes: { 'PlatformPrincipal'