Tag Archives: Amazon Pinpoint

Exciting New Email Features Available Now in Amazon Pinpoint

Post Syndicated from Brent Meyer original https://aws.amazon.com/blogs/messaging-and-targeting/exciting-new-email-features-available-now-in-amazon-pinpoint/

Yesterday, we launched several exciting new email-related features in Amazon Pinpoint. The biggest of these features is the ability to send transactional emails. Transactional emails are a great way to send one-to-one emails to your customers without creating segments or campaigns first. For example, when a customer makes a purchase in your app, or requests a password reset, you can send them an email immediately and directly with the information that they need. You can send transactional emails by using the Amazon Pinpoint API or an AWS SDK, or by using the Amazon Pinpoint SMTP interface.

Along with the ability to send transactional emails, we also added a dashboard that gives you deep insights into the performance of the emails you’ve sent. You can use this dashboard to view several response metrics related to the transactional emails you’ve sent, including your delivery, bounce, and complaint rates, the number of emails that were opened and clicked, and more. You can filter this dashboard to include data from 1 to 30 days.

We’ve also added the ability to lease dedicated IP addresses through Amazon Pinpoint. Dedicated IP addresses are IP addresses that are reserved for your exclusive use. Dedicated IP addresses give you complete control over the reputations of the IP addresses that you use to send email through Amazon Pinpoint. When you use dedicated IP addresses, you can create pools of your dedicated IP addresses. Dedicated IP pools are groups of IP addresses you use for different purposes. For example, you can create a pool of addresses to use when sending transactional messages, and another pool for sending marketing communications.

We also added the following email-related capabilities:

  • Content personalization: Generic, one-size-fits-all emails tend to have lower engagement rates than personalized messages. When you send a transactional email, you can include personalization tags, such as the recipient’s name or location. When Amazon Pinpoint sends the mail, it replaces the personalization tags with the appropriate values for the recipient.
  • Event destinations: You can use event destinations to send information about email events to various destinations, including Amazon CloudWatch, Amazon SNS, and Amazon Kinesis Data Firehose. Email events include email opens, clicks, bounces, complaints, and rejections.
  • Raw email support: You can use the Amazon Pinpoint API or SMTP interface to send raw, MIME-formatted emails. MIME emails can include custom headers and file attachments.

These features are available now in all AWS Regions where Amazon Pinpoint is available. We hope that these features help you find exciting new ways to use Amazon Pinpoint to connect and engage with your customers.

Amazon Pinpoint Offers Customers a New Console Experience with Richer Segmentation Capabilities to Drive End-User Engagement

Post Syndicated from Zach Barbitta original https://aws.amazon.com/blogs/messaging-and-targeting/amazon-pinpoint-offers-customers-a-new-console-experience-with-richer-segmentation-capabilities-to-drive-end-user-engagement/

Last night, we launched a significant update to the Amazon Pinpoint console. These updates make it easier to start sending campaigns with Amazon Pinpoint. In fact, you can start engaging with your customers in as few as three clicks!

This update also includes advanced segmentation capabilities, which enable you to filter based on user, endpoint, and channel attributes and bind those filters with certain conditions, such as AND, OR, and EQUAL TO operators. These features help you create finely-tuned segments, which result in better engagement and happier end-users. To learn more about creating segments in Amazon Pinpoint, see our tutorial in the Amazon Pinpoint User Guide.

Amazon Pinpoint’s new segmentation capabilities enable the following use cases:

  • Create new sub-segments from existing segments: You can now create sub-segments by selecting an existing segment and applying segmentation logic to it. For example, you could import a list of email addresses and filter out certain customers based on real-time endpoint attributes, such as the customer’s paid or free tier status. To learn more about creating segments, see Building Segments in the Amazon Pinpoint User Guide.
  • Advanced segmentation using smart operators: You can now create dynamic segments that incorporate certain operators, such as AND, OR, and EQUAL TO. For example, let’s say you classify your customers into tiers: tier 1 and tier 2. With today’s launch, you could create a new segment of customers whose tier status is equal to tier 1 OR tier 2, and then further refine your segment to include users who were not active in past 7 days.
  • Understand the impact of additional filters on the size of your segments, and see your audience size at a glance: The updated segmentation tool shows you the total size of your segment at all times. This size estimate is continuously updated as you add more filters to the segment, letting you see the impact of your filters in near real-time.

These new features are available to all Amazon Pinpoint users today at no additional cost.

Creating an AI-powered marketing solution for sentiment analysis and engagement

Post Syndicated from Zach Barbitta original https://aws.amazon.com/blogs/messaging-and-targeting/creating-an-ai-powered-marketing-solution-for-sentiment-analysis-and-engagement/

Note: Matt Dombrowski, one of our amazing Solutions Architects, wrote this article. He also developed the sample code that you can use to implement this solution.


Marketers know that it’s critical to understand the conversations that customers are having about their brands. The holy grail isn’t just to understand what’s happening on social media, but to distill those conversations into actionable insights. After that, you can scale, automate, and continuously improve your brand’s ability to engage.

In this blog post, we’ll demonstrate how your marketing department can use machine learning to understand social user sentiment and engage with users.

You’ll assume the role of a Marketing Manager at an up-and-coming retail company called Mountain Manhattan. Mountain Manhattan has seen strong growth in recent years, and is now looking for a better way to engage with its Twitter followers. Specifically, Mountain Manhattan wants to know who its advocates and distracters are, what the overall sentiment of the brand is, and who the key influencers are that need the white-glove treatment.

After that, we’ll show you how to quickly deploy a solution for real-time social media sentiment analysis and engagement. This process consists of three basic steps. First, you collect tweets that refer to your brand’s Twitter handle. Next, you use machine learning to assign a score to those tweets. And finally, you use Amazon Pinpoint to engage with your customers based on those scores.

Mountain Manhattan’s challenges

Like many companies, Mountain Manhattan has more data than they can act on. Mountain Manhattan receives over 1,000 tweets a day. That’s more than 365,000 tweets per year! Like most companies with a social media strategy, Mountain Manhattan thinks of each of these tweets as an ‘opportunity to engage.’ One of Mountain Manhattan’s challenges is that they need the tone, voice, response time, and candor of their responses to be clear and consistent—and they need to do so in several different languages.

They tried the brute force approach of reading tweets and manually responding to each one. However, this process quickly became unsustainable (not to mention very expensive) because of limited time and resources. Also, while Mountain Manhattan’s marketing team is rather tech-savvy, they don’t have the time or experience to worry about technical issues like ongoing development or security. Mountain Manhattan needs an engagement solution that’s affordable and effective, and that has industry-leading reliability, scale, and security.

The solution

Mountain Manhattan decided to use several AWS services to create an integrated social media monitoring and customer engagement solution. The marketing team spent about 30 minutes setting up the sophisticated solution described below, which enables testing and iteration on multiple use cases before going live.

This solution monitors a Twitter feed, and sends relevant tweets to an Amazon Kinesis data stream. Then it uses an AWS Lambda function to take the appropriate action. In this case, that action involves first calling Amazon Comprehend to provide a sentiment score, and then using Amazon Pinpoint to engage with the Twitter user. This solution has several benefits for Mountain Manhattan:

  • It’s scalable. Mountain Manhattan has flash and holiday sales, targeted campaigns, and various ad campaigns that can lead to spikes in customer tweets. This solution can handle nearly any workload in real time. Furthermore, ingesting every single tweet about their brand helps Mountain Manhattan get a holistic view of customer sentiment.
  • It’s easy to use. Mountain Manhattan needs to adapt to their customer needs. This means that they need a solution that’s customizable, user-friendly, and intuitive to use. By using Amazon Pinpoint, Mountain Manhattan’s marketing team was able to set up recurring campaigns based on certain customer characteristics. The daily, automated campaigns send notifications to an ever-updating dynamic segment. This ensures that customers never receive the same campaign message twice.
  • It’s cost-effective. Priorities for Mountain Manhattan can change quickly, and long-term contracts are no longer appealing to management. By using AWS services, there are no subscription fees, upfront costs, or long-term commitments. Mountain Manhattan pays only for they use, and they can adjust their marketing spend at any time.
  • It lets you own your data. Data is the lifeblood of modern marketing organizations. Companies need to own their data for use across many applications and systems. This solution gives Mountain Manhattan that ownership and flexibility. If it ever becomes necessary, they can change the destination of their Kinesis data streams to nearly any destination, and can export their customer data from Amazon Pinpoint.

How the solution works

The following architecture diagram shows the various AWS services that enable this AI-powered social sentiment marketing solution.

An image that shows the relationship between the various components used in this solution.

Let’s take a closer look at each of these components. This solution uses the following services and solutions:

  • Mobile client: Mountain Manhattan’s mobile app uses the Twitter SDK to authenticate users. The app is implemented in React Native for cross-platform compatibility, and because Mountain Manhattan’s developers are more familiar with JavaScript. Integrating the Twitter SDK enables Mountain Manhattan to map customers’ Twitter handles to specific mobile devices. There are a variety of ways to authenticate users—including authentication services from Facebook, Google, and Amazon. In this example, we focus on Twitter.
  • Amazon Kinesis Data Streams: This AWS service transfers tweets from Twitter into AWS Lambda (for sentiment analysis) and Amazon S3 (for long-term archival). Kinesis Data Streams can capture and store terabytes of data per hour from hundreds of thousands of sources. In the future, Mountain Manhattan could expand this solution to analyze data from Facebook, point-of-sale terminals, and website click streams.
  • Amazon ElasticSearch: Kinesis Firehose streams the tweets into an ElasticSearch cluster. By using ElasticSearch, Mountain Manhattan can easily search the data, and can visualize it by using Kibana.
  • AWS Lambda and Amazon Comprehend: Mountain Manhattan uses AWS Lambda to execute code without having to worry about deploying and maintaining servers. The AWS Lambda function looks at the tweets as they come in and determines the appropriate action to take. In Mountain Manhattan’s case, if the customer who tweeted is known, it calls Amazon Comprehend to perform AI-based sentiment analysis. Based on the results of that sentiment analysis, the Lambda function calls Amazon Pinpoint to begin the customer engagement process.
  • Amazon Pinpoint: This solution uses Amazon Pinpoint to handle two essential functions. First, it captures information about endpoints (the unique devices that use the app). Second, it sends targeted campaigns to those endpoints. The AWS Mobile SDK, which is integrated into Mountain Manhattan’s app, automatically associates the customer’s Twitter handle with their endpoint ID in Amazon Pinpoint. Mountain Manhattan also collects some custom attributes for each endpoint. For example, they place each endpoint into one of the following categories: Influencers, Supporters, Detractors, Loyal Shoppers, and CS Support Needed. By categorizing customers in this way, Mountain Manhattan can create more personalized messaging.

Mountain Manhattan’s solution in action

As Mountain Manhattan starts to ingest tweets, they get to know a lot more about their customers than just what they said. Mountain Manhattan can see the number of followers a user has, which is a good way to identify influencers. Additionally, Mountain Manhattan can see the Twitter user’s description, logo, picture, and location (if the user has exposed it). All of this data is fed into the AWS Lambda function, where Mountain Manhattan can take the customized action.

The screenshots in the following sections show the kinds of push notifications that Mountain Manhattan could automatically send to customers based on the content of their tweets.

Identifying influencers and early adopters

Mountain Manhattan’s AWS Lambda function determines how many Twitter followers each user has. If the number of followers is above a certain threshold, the function attaches the Influencer custom attribute to the user’s endpoint, and sends them a push notification.A push notification that says "We like you too! Tap here to join our Influencers Club and get free stuff!"

Tracking and engaging with consumers during events or promotions

During events, Mountain Manhattan can join the conversation with their customers by sending messages in real time based on customers’ tweets.A push notification that says "We're glad you're enjoying the sale! Tap here to subscribe to our events calendar."

Proactively engaging with customers having support issues

When Mountain Manhattan determines that the sentiment of a tweet is negative, they can send custom push notifications in an attempt to resolve the issue.A push notification that says "Sorry to hear you're having trouble! :( Tap here to talk to Jake, one of our best support team members."

Offering discounts or concessions to unhappy customers

Mountain Manhattan could monitor for certain words or phrases, such as “shipping delays”. When they detect these keywords, Amazon Pinpoint can automatically send a push notification that offers a discount on a future purchase.A push notification that says "We agree--delays are annoying! Tap here to get 20% off your next order."

Deploying the solution

Now that we’ve seen how this solution works, it’s time to implement it. The coolest part? You can use an AWS CloudFormation template to deploy all of the AWS components of this solution in a few clicks and about 10 minutes of your time.

Note: The procedures for deploying this solution might change over time as we continue to make improvements to it. For the latest procedures, see the Github page for this solution at https://github.com/aws-samples/amazon-pinpoint-social-sentiment/.

Prerequisites

To complete these procedures, you have to have the following:

  • A mobile app that uses Twitter’s APIs or SDK for authentication and for ingesting tweets.
  • A macOS-based computer and physical iOS device (the Simulator that’s included with Xcode isn’t sufficient for testing this solution).
  • Xcode, Node.js, npm, and CocoaPods installed on your macOS-based computer.
    • To download Xcode, go to https://developer.apple.com/download/.
    • To download Node.js and npm, go to https://nodejs.org/en/. Download the latest Long-Term Support (LTS) version for macOS.
    • To download and install CocoaPods, type the following command at the macOS command line: sudo gem install cocoapods
  • The AWS Command Line Interface (AWS CLI) installed and configured on your macOS-based computer. For information about installing the AWS CLI, see Installing the AWS Command Line Interface. For information about setting up the AWS CLI, see Configuring the AWS CLI.
  • An AWS account with sufficient permissions to create the resources shown in the architecture diagram in the earlier section. For more information about creating an AWS account, see How do I create and activate a new Amazon Web Services account.
  • An Amazon EC2 key pair. You need this to log in to the EC2 instance if you want to modify the Twitter handle that you’re monitoring. For more information, see Creating a Key Pair Using Amazon EC2.
  • An Apple Developer account. Note that the approach that we cover in this post focuses exclusively on iOS devices. You can implement this solution on Android devices

Part 1: Create a Twitter application

The first step in this process is to create a Twitter app, which gives you access to the Twitter API. This solution uses the Twitter API to collect tweets in real time.

To create a Twitter application:

  1. Log in to your Twitter account. If you don’t already have a Twitter account, create one at https://twitter.com/signup.
  2. Go to https://apps.twitter.com/app/new, and then choose Create a new application.
  3. Under Application Details, complete the following sections:
    • For Name, type the name of your app.
    • For Description, type a description of your app.
    • For the Website and Callback URL fields, type any fully qualified URL (such as https://www.example.com). You’ll change these values in a later step, so the values you enter at this point aren’t important.
  4. Choose Create your Twitter application.
  5. Under Your access token, choose Create your access token.
  6. Under Application type, choose Read Only.
  7. Under Oauth settings, note the values next to Consumer key and Consumer secret. Then, under Your access token, note the values next to Access key and Secret access key. You’ll need all of these values in later steps.

Part 2: Install the dependencies

This solution requires you to download and set up some files from a GitHub repository.

To configure the AWS Mobile SDK in your app:

  1. Open Terminal.app. On the command line, navigate to the directory where you want to create your project.
  2. On the command line, type the following command to clone the repository that contains the source code that you’re using to configure this solution: git clone https://github.com/aws-samples/amazon-pinpoint-social-sentiment/
  3. Type the following command to change to the directory that contains the installation files: cd amazon-pinpoint-social-sentiment/mobile
  4. Type the following command to download the dependencies for this solution: npm install
  5. Type the following command to link the dependencies in the project: react-native link
  6. Type the following command to change into the ios directory: cd ios
  7. Type the following command to install CocoaPods into your project: pod install

Part 3: Set up your app to use the AWS Mobile SDK

To configure your app:

  1. From the /mobile directory, type the following command to create a backend project for your app and pull the service configuration (aws-exports.js file) into your project: awsmobile init. Press Enter at each prompt to accept the default response, as shown in the following example.
    Please tell us about your project:
    ? Where is your project's source directory: /
    ? Where is your project's distribution directory that stores build artifacts: /
    ? What is your project's build command: npm run-script build
    ? What is your project's start command for local test run: npm run-script start
    
    ? What awsmobile project name would you like to use: mobile-2018-08-16-03-16-39

  2. Open the file aws-exports.js. This file contains information about the backend configuration of your AWS Mobile Hub project. Take note of the aws_mobile_analytics_app_id key—you’ll use this value in a later step.
  3. In a text editor, open the file pinpoint-social-sentiment/mobile/App.js. Under TwitterAuth.init, next to twitter_key, replace <your key here> with the consumer key that you received when you created your Twitter app in step 1. Then, next to twitter_secret, replace <your secret here> with the consumer secret you received when you created your Twitter app. When you finish, save the file.
  4. In a text editor, open the file amazon-pinpoint-social-sentiment/mobile/ios/MobileCon/AppDelegate.m. Search for the following section:
    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
    {
      NSURL *jsCodeLocation;
    
      [[Twitter sharedInstance] startWithConsumerKey:@"<your-consumer-key>" consumerSecret:@"<your-consumer-secret>"];

    In this section, replace <your-consumer-key> with your Twitter consumer key, and replace <your-consumer-secret> with your Twitter consumer secret.

  5. In a text editor, open the file amazon-pinpoint-social-sentiment/mobile/ios/MobileCon/Info.plist. Search for the following section:
    <key>CFBundleURLTypes</key>
        <array>
            <dict>
                <key>CFBundleURLSchemes</key>
                <array>
                    <string>twitterkit-<your-API-key></string>
                </array>
            </dict>
        </array>
        ...

    Replace <your-API-key> with your Twitter consumer secret.

Part 4: Set up push notifications in your app

Now you’re ready to set up your app to send push notifications. A recent Medium post from Nader Dabit, one of our Developer Advocates, outlines this process nicely. Start at the Apple Developer Configuration section, and complete the remaining steps. After you complete these steps, your app is ready to send push notifications.

Part 5: Launch the AWS CloudFormation template

While your app is building, you can launch the AWS CloudFormation template that sets up the backend components that power this solution.

  1. Sign in to the AWS Management Console, and then open the AWS CloudFormation console at https://console.aws.amazon.com/cloudformation/home.
  2. Use the region selector to select the US East (N. Virginia) region.
  3. Choose Create new stack.
  4. Next to Choose a template, choose Specify an Amazon S3 template URL, and then paste the following URL: https://s3.amazonaws.com/mattd-customer-share/twitterdemo.template.yaml. Choose Next.
  5. Under Specify Details, for Stack Name, type a name for the CloudFormation stack.
  6. Under Parameters, do the following:
    1. For AccessToken, type your Twitter access token.
    2. For SecretAccessToken, type your Twitter access token secret.
    3. For AppId, type the app ID that you obtained in Part 3.
    4. For ConsumerKey, type your Twitter consumer key.
    5. For ConsumerSecret, type your Twitter consumer secret.
  7. Choose Next.
  8. On the next page, review your settings, and then choose Next again. On the final page, select the box to indicate that you understand that AWS CloudFormation will create IAM resources, and then choose Create.

When you choose Create, AWS CloudFormation creates the all of the backend components for the application. These include an EC2 instance, networking infrastructure, a Kinesis data stream, a Kinesis Firehose delivery stream, an S3 bucket, an Elasticsearch cluster, and a Lambda function. This process takes about 10 minutes to complete.

Part 6: Send a test tweet

Now you’re ready to test the solution to make sure that all of the components work as expected.

Start by logging in to your Twitter account. Send a tweet to @awsformobile. Your tweet should contain language that has a positive sentiment.

Your EC2 instance, which monitors the Twitter streaming API, captures this tweet. When this happens, the EC2 instance uses the Kinesis data stream to send the tweet to an Amazon S3 bucket for long-term storage. It also sends the tweet to AWS Lambda, which uses Amazon Comprehend to assign a sentiment score to the tweet. If the message is positive, Amazon Pinpoint sends a push notification to the Twitter handle that sent the message.

You can monitor the execution of the Lambda function by using Amazon CloudWatch Logs. You can access the CloudWatch Logs console at https://console.aws.amazon.com/cloudwatch/home?region=us-east-1#logs. The log should contain an entry that resembles the following example:

On the Amazon Elasticsearch Service (Amazon ES) console, you can watch as Amazon ES catalogs incoming tweets. You can access this console at https://console.aws.amazon.com/es/home?region=us-east-1. For the Amazon ES domain for the tweets, choose the Kibana URL. You can use Kibana to easily search your incoming tweets, as shown in the following image:

Finally, you can go to your Amazon S3 bucket to view an archive of the tweets that were addressed to you. This bucket is useful for simple archiving, additional analysis, visualization, or even machine learning. You can access the Amazon S3 console at https://s3.console.aws.amazon.com/s3/home?region=us-east-1#.

Part 7: Create an Amazon Pinpoint campaign

In the real world, you probably don’t want to send messages to users immediately after they send tweets to your Twitter handle. If you did, you might seem too aggressive, and your customers might hesitate to engage with your brand in the future.

Fortunately, you can use the campaign scheduling tools in Amazon Pinpoint to create a recurring campaign.

  1. Sign in to the AWS Management Console, and then open the Amazon Pinpoint console at https://console.aws.amazon.com/pinpoint/home/?region=us-east-1.
  2. On the Projects page, choose your app.
  3. In the navigation pane, choose Campaigns, and then choose New Campaign.
  4. For Campaign name, type a name for the campaign, and then choose Next step.
  5. On the Segment page, do the following
    1. Choose Create a new segment.
    2. For Name your segment to reuse it later, type a name for the segment.
    3. For Filter by user attributes, choose the plus sign (+) icon. Filter by segment to include all endpoints where Sentiment is Positive, as shown in the following image:A screenshot that shows how to add the Sentiment = Positive attribute to a Pinpoint segment.
    4. Choose Next step.
  6. On the Message page, type the message that you want to send, and then choose Next step. To learn more about writing mobile push messages, see Writing a Mobile Push Message in the Amazon Pinpoint User Guide.
  7. On the Schedule page, choose the date and time when the message will be sent. You can also schedule the campaign to run on a recurring basis, such as every week. To learn more about scheduling campaigns, see Set the Campaign Schedule in the Amazon Pinpoint User Guide.

Final thoughts

In this blog post, we demonstrated how your marketing department can use machine learning to understand social user sentiment and engage with users.

In the interest of transparency, we calculated the total costs associated with running this solution. Our calculation includes a small Elasticsearch cluster, a small EC2 instance, storage costs, compute costs, and messaging costs. Assuming your app has 1 million monthly active users (MAUs), and assuming that 0.5% of those MAUs mention your brand every month on Twitter, running this solution would cost $28.66 per month, or just under four cents an hour.

We think this solution is one of the most affordable and capable social media sentiment analysis tools you’ll find on the market today. The best part about this solution is that it can be a complete solution—or the starting point for your own customized solution.

Need to send push messages on other platforms, such as Firebase Cloud Messaging (FCM) (for most Android devices)? No problem. Just set up your app to send endpoint data to Amazon Pinpoint and to send push notifications, and you’re ready to go! Want to send messages through different channels? If you have other endpoint data for your customers (such as email addresses or mobile phone numbers), you can add channels to your project in Amazon Pinpoint, and then use those channels to send messages.

We’re very excited about this solution, and we can’t wait to see what you build with it!

Streaming Events from Amazon Pinpoint to Redshift

Post Syndicated from Brent Meyer original https://aws.amazon.com/blogs/messaging-and-targeting/streaming-events-from-amazon-pinpoint-to-redshift/

Note: This post was originally written by Ryan Idrigo-Lam, one of the founding members of the Amazon Pinpoint team.


You can use Amazon Pinpoint to segment, target, and engage with your customers directly from the console. The Pinpoint console also includes a variety of dashboards that you can use to keep track of how your customers use your applications, and measure how likely your customers are to engage with the messages you send them.

Some Pinpoint customers, however, have use cases that require a bit more than what these dashboards have to offer. For example, some customers want to join their Pinpoint data to external data sets, or to collect historical data beyond the six month window that Pinpoint retains. To help customers meet these needs, and many more, Amazon Pinpoint includes a feature called Event Streams.

This article provides information about using Event Streams to export your data from Amazon Pinpoint and into a high-performance Amazon Redshift database. Once your data is in Redshift, you can run queries against it, join it with other data sets, use it as a data source for analytics and data visualization tools, and much more.

Step 1: Create a Redshift Cluster

The first step in this process involves creating a new Redshift cluster to store your data. You can complete this step in a few clicks by using the Amazon Redshift console. For more information, see Managing Clusters Using the Console in the Amazon Redshift Cluster Management Guide.

When you create the new cluster, make a note of the values you specify for the Cluster Identifier, Database Name, Master User Name, and Master User Password. You’ll use all of these values when you set up Amazon Kinesis Firehose in the next section.

Step 2: Create a Firehose Delivery Stream with a Redshift Destination

After you create your Redshift cluster, you can create the Amazon Kinesis Data Firehose delivery stream that will deliver your Pinpoint data to the Redshift cluster.

To create the Kinesis Data Firehose delivery stream

  1. Open the Amazon Kinesis Data Firehose console at https://console.aws.amazon.com/firehose/home.
  2. Choose Create delivery stream.
  3. For Delivery stream name, type a name.
  4. Under Choose source, for Source, choose Direct PUT or other sources. Choose Next.
  5. On the Process records page, do the following:
    1. Under Transform source records with AWS Lambda, choose Enabled if you want to use a Lambda function to transform the data before Firehose loads it into Redshift. Otherwise, choose Disabled.
    2. Under Convert record format, choose Disabled, and then choose Next.
  6. On the Choose destination page, do the following:
    1. For Destination, choose Amazon Redshift.
    2. Under Amazon Redshift destination, specify the Cluster name, User name, Password, and Database for the Redshift database you created earlier. Also specify a name for the Table.
    3. Under Intermediate S3 destination, choose an S3 bucket to store data in. Alternatively, choose Create new to create a new bucket. Choose Next.
  7. On the Configure settings page, do the following:
    1. Under IAM role, choose an IAM role that Firehose can use to access your S3 bucket and KMS key. Alternatively, you can have the Firehose console create a new role. Choose Next.
    2. On the Review page, confirm the settings you specified on the previous pages. If the settings are correct, choose Create delivery stream.

Step 3: Create a JSONPaths file

The next step in this process is to create a JSONPaths file and upload it to an Amazon S3 bucket. You use the JSONPaths file to tell Amazon Redshift how to interpret the unstructured JSON that Amazon Pinpoint provides.

To create a JSONPaths file and upload it to Amazon S3

  1. In a text editor, create a new file.
  2. Paste the following code into the text file:
    {
      "jsonpaths": [
        "$['event_type']",
        "$['event_timestamp']",
        "$['arrival_timestamp']",
        "$['event_version']",
        "$['application']['app_id']",
        "$['application']['package_name']",
        "$['application']['version_name']",
        "$['application']['version_code']",
        "$['application']['title']",
        "$['application']['cognito_identity_pool_id']",
        "$['application']['sdk']['name']",
        "$['application']['sdk']['version']",
        "$['client']['client_id']",
        "$['client']['cognito_id']",
        "$['device']['model']",
        "$['device']['make']",
        "$['device']['platform']['name']",
        "$['device']['platform']['version']",
        "$['device']['locale']['code']",
        "$['device']['locale']['language']",
        "$['device']['locale']['country']",
        "$['session']['session_id']",
        "$['session']['start_timestamp']",
        "$['session']['stop_timestamp']",
        "$['monetization']['transaction']['transaction_id']",
        "$['monetization']['transaction']['store']",
        "$['monetization']['transaction']['item_id']",
        "$['monetization']['transaction']['quantity']",
        "$['monetization']['transaction']['price']['reported_price']",
        "$['monetization']['transaction']['price']['amount']",
        "$['monetization']['transaction']['price']['currency']['code']",
        "$['monetization']['transaction']['price']['currency']['symbol']",
        "$['attributes']['campaign_id']",
        "$['attributes']['campaign_activity_id']",
        "$['attributes']['my_custom_attribute']",
        "$['metrics']['my_custom_metric']"
      ]
    }

  3. Modify the preceding code example to include the fields that you want to import into Redshift.
    Note: You can specify custom attributes or metrics by replacing my_custom_attribute or my_custom_metric in the example above with your custom attributes or metrics, respectively.
  4. When you finish modifying the code example, remove all whitespace, including spaces and line breaks, from the file. Save the file as json-paths.json.
  5. Open the Amazon S3 console at https://s3.console.aws.amazon.com/s3/home.
  6. Choose the S3 bucket you created when you set up the Firehose stream. Upload json-paths.json into the bucket.

Step 4: Configure the table in Redshift

At this point, it’s time to finish setting up your Redshift database. In this section, you’ll create a table in the Redshift cluster you created earlier. The columns in this table mirror the values you specified in the JSONPaths file in the previous section.

  1. Connect to your Redshift cluster by using a database tool such as SQL Workbench/J. For more information about connecting to a cluster, see Connect to the Cluster in the Amazon Redshift Getting Started Guide.
  2. Create a new table that contains a column for each field in the JSONPaths file you created in the preceding section. You can use the following example as a template.
    CREATE schema AWSMA;
    CREATE TABLE AWSMA.event(
      event_type VARCHAR(256) NOT NULL ENCODE LZO,
      event_timestamp TIMESTAMP NOT NULL ENCODE LZO,
      arrival_timestamp TIMESTAMP NULL ENCODE LZO,
      event_version CHAR(12) NULL ENCODE LZO,
      application_app_id VARCHAR(64) NOT NULL ENCODE LZO,
      application_package_name VARCHAR(256) NULL ENCODE LZO,
      application_version_name VARCHAR(256) NULL ENCODE LZO,
      application_version_code VARCHAR(256) NULL ENCODE LZO,
      application_title VARCHAR(256) NULL ENCODE LZO,
      application_cognito_identity_pool_id VARCHAR(64) NULL ENCODE LZO,
      application_sdk_name VARCHAR(256) NULL ENCODE LZO,
      application_sdk_version VARCHAR(256) NULL ENCODE LZO,
      client_id VARCHAR(64) NULL DISTKEY ENCODE LZO,
      client_cognito_id VARCHAR(64) NULL ENCODE LZO,
      device_model VARCHAR(256) NULL ENCODE LZO,
      device_make VARCHAR(256) NULL ENCODE LZO,
      device_platform_name VARCHAR(256) NULL ENCODE LZO,
      device_platform_version VARCHAR(256) NULL ENCODE LZO,
      device_locale_code VARCHAR(256) NULL ENCODE LZO,
      device_locale_language VARCHAR(64) NULL ENCODE LZO,
      device_locale_country VARCHAR(64) NULL ENCODE LZO,
      session_id VARCHAR(64) NULL ENCODE LZO,
      session_start_timestamp TIMESTAMP NULL ENCODE LZO,
      session_stop_timestamp TIMESTAMP NULL ENCODE LZO,
      monetization_transaction_id VARCHAR(64) NULL ENCODE LZO,
      monetization_transaction_store VARCHAR(64) NULL ENCODE LZO,
      monetization_transaction_item_id VARCHAR(64) NULL ENCODE LZO,
      monetization_transaction_quantity FLOAT8 NULL,
      monetization_transaction_price_reported VARCHAR(64) NULL ENCODE LZO,
      monetization_transaction_price_amount FLOAT8 NULL,
      monetization_transaction_price_currency_code VARCHAR(16) NULL ENCODE LZO,
      monetization_transaction_price_currency_symbol VARCHAR(32) NULL ENCODE LZO,
      - Custom Attributes
      a_campaign_id VARCHAR(4000),
      a_campaign_activity_id VARCHAR(4000),
      a_my_custom_attribute VARCHAR(4000),
      - Custom Metrics
      m_my_custom_metric float8
    )
    SORTKEY ( application_app_id, event_timestamp, event_type);

Step 5: Configure the Firehose Stream

You’re getting close! At this point, you’re ready to point the Kinesis Data Firehose stream to your JSONPaths file so that Redshift parses the incoming data properly. You also need to list the columns of the table that your data will be copied into.

To configure the Firehose Stream

  1. Open the Amazon Kinesis Data Firehose console at https://console.aws.amazon.com/firehose/home.
  2. In the list of delivery streams, choose the delivery stream you created earlier.
  3. On the Details tab, choose Edit.
  4. Under Amazon Redshift destination, for COPY options, paste the following:
    JSON 's3://s3-bucket/json-paths.json'
    TRUNCATECOLUMNS
    TIMEFORMAT 'epochmillisecs'

  5. Replace s3-bucket in the preceding code example with the path to the S3 bucket that contains json-paths.json.
  6. For Columns, list all of the columns that are present in the JSONPaths file you created earlier. Specify the column names in the same order as they’re listed in the json-paths.json file, using commas to separate the column names. When you finish, choose Save.

Step 6: Enable Event Streams in Amazon Pinpoint

The only thing left to do now is to tell Amazon Pinpoint to start sending data to Amazon Kinesis.

To enable Event Streaming in Amazon Pinpoint

  1. Open the Amazon Pinpoint console at https://console.aws.amazon.com/pinpoint/home.
  2. Choose the application or project that you want to enable event streams for.
  3. In the navigation pane, choose Settings.
  4. On the Event stream tab, choose Enable streaming of events to Amazon Kinesis.
  5. Under Stream to Amazon Kinesis, select Send events to an Amazon Kinesis Firehose delivery stream.
  6. For Amazon Kinesis Firehose delivery stream, choose the stream you created earlier.
  7. For IAM role, choose an existing role that allows the firehose:PutRecordBatch action, or choose Automatically create a role to have Amazon Pinpoint create a role with the appropriate permissions. If you choose to have Amazon Pinpoint create a role for you, type a name for the role. Choose Save.

That’s it! Once you complete this final step, Amazon Pinpoint starts exporting the data you specified into your Redshift cluster.

I hope this walk through was helpful. If you have any questions, please let us know in the comments or in the Amazon Pinpoint forum.

AWS Online Tech Talks – June 2018

Post Syndicated from Devin Watson original https://aws.amazon.com/blogs/aws/aws-online-tech-talks-june-2018/

AWS Online Tech Talks – June 2018

Join us this month to learn about AWS services and solutions. New this month, we have a fireside chat with the GM of Amazon WorkSpaces and our 2nd episode of the “How to re:Invent” series. We’ll also cover best practices, deep dives, use cases and more! Join us and register today!

Note – All sessions are free and in Pacific Time.

Tech talks featured this month:

 

Analytics & Big Data

June 18, 2018 | 11:00 AM – 11:45 AM PTGet Started with Real-Time Streaming Data in Under 5 Minutes – Learn how to use Amazon Kinesis to capture, store, and analyze streaming data in real-time including IoT device data, VPC flow logs, and clickstream data.
June 20, 2018 | 11:00 AM – 11:45 AM PT – Insights For Everyone – Deploying Data across your Organization – Learn how to deploy data at scale using AWS Analytics and QuickSight’s new reader role and usage based pricing.

 

AWS re:Invent
June 13, 2018 | 05:00 PM – 05:30 PM PTEpisode 2: AWS re:Invent Breakout Content Secret Sauce – Hear from one of our own AWS content experts as we dive deep into the re:Invent content strategy and how we maintain a high bar.
Compute

June 25, 2018 | 01:00 PM – 01:45 PM PTAccelerating Containerized Workloads with Amazon EC2 Spot Instances – Learn how to efficiently deploy containerized workloads and easily manage clusters at any scale at a fraction of the cost with Spot Instances.

June 26, 2018 | 01:00 PM – 01:45 PM PTEnsuring Your Windows Server Workloads Are Well-Architected – Get the benefits, best practices and tools on running your Microsoft Workloads on AWS leveraging a well-architected approach.

 

Containers
June 25, 2018 | 09:00 AM – 09:45 AM PTRunning Kubernetes on AWS – Learn about the basics of running Kubernetes on AWS including how setup masters, networking, security, and add auto-scaling to your cluster.

 

Databases

June 18, 2018 | 01:00 PM – 01:45 PM PTOracle to Amazon Aurora Migration, Step by Step – Learn how to migrate your Oracle database to Amazon Aurora.
DevOps

June 20, 2018 | 09:00 AM – 09:45 AM PTSet Up a CI/CD Pipeline for Deploying Containers Using the AWS Developer Tools – Learn how to set up a CI/CD pipeline for deploying containers using the AWS Developer Tools.

 

Enterprise & Hybrid
June 18, 2018 | 09:00 AM – 09:45 AM PTDe-risking Enterprise Migration with AWS Managed Services – Learn how enterprise customers are de-risking cloud adoption with AWS Managed Services.

June 19, 2018 | 11:00 AM – 11:45 AM PTLaunch AWS Faster using Automated Landing Zones – Learn how the AWS Landing Zone can automate the set up of best practice baselines when setting up new

 

AWS Environments

June 21, 2018 | 11:00 AM – 11:45 AM PTLeading Your Team Through a Cloud Transformation – Learn how you can help lead your organization through a cloud transformation.

June 21, 2018 | 01:00 PM – 01:45 PM PTEnabling New Retail Customer Experiences with Big Data – Learn how AWS can help retailers realize actual value from their big data and deliver on differentiated retail customer experiences.

June 28, 2018 | 01:00 PM – 01:45 PM PTFireside Chat: End User Collaboration on AWS – Learn how End User Compute services can help you deliver access to desktops and applications anywhere, anytime, using any device.
IoT

June 27, 2018 | 11:00 AM – 11:45 AM PTAWS IoT in the Connected Home – Learn how to use AWS IoT to build innovative Connected Home products.

 

Machine Learning

June 19, 2018 | 09:00 AM – 09:45 AM PTIntegrating Amazon SageMaker into your Enterprise – Learn how to integrate Amazon SageMaker and other AWS Services within an Enterprise environment.

June 21, 2018 | 09:00 AM – 09:45 AM PTBuilding Text Analytics Applications on AWS using Amazon Comprehend – Learn how you can unlock the value of your unstructured data with NLP-based text analytics.

 

Management Tools

June 20, 2018 | 01:00 PM – 01:45 PM PTOptimizing Application Performance and Costs with Auto Scaling – Learn how selecting the right scaling option can help optimize application performance and costs.

 

Mobile
June 25, 2018 | 11:00 AM – 11:45 AM PTDrive User Engagement with Amazon Pinpoint – Learn how Amazon Pinpoint simplifies and streamlines effective user engagement.

 

Security, Identity & Compliance

June 26, 2018 | 09:00 AM – 09:45 AM PTUnderstanding AWS Secrets Manager – Learn how AWS Secrets Manager helps you rotate and manage access to secrets centrally.
June 28, 2018 | 09:00 AM – 09:45 AM PTUsing Amazon Inspector to Discover Potential Security Issues – See how Amazon Inspector can be used to discover security issues of your instances.

 

Serverless

June 19, 2018 | 01:00 PM – 01:45 PM PTProductionize Serverless Application Building and Deployments with AWS SAM – Learn expert tips and techniques for building and deploying serverless applications at scale with AWS SAM.

 

Storage

June 26, 2018 | 11:00 AM – 11:45 AM PTDeep Dive: Hybrid Cloud Storage with AWS Storage Gateway – Learn how you can reduce your on-premises infrastructure by using the AWS Storage Gateway to connecting your applications to the scalable and reliable AWS storage services.
June 27, 2018 | 01:00 PM – 01:45 PM PTChanging the Game: Extending Compute Capabilities to the Edge – Discover how to change the game for IIoT and edge analytics applications with AWS Snowball Edge plus enhanced Compute instances.
June 28, 2018 | 11:00 AM – 11:45 AM PTBig Data and Analytics Workloads on Amazon EFS – Get best practices and deployment advice for running big data and analytics workloads on Amazon EFS.

Practice Makes Perfect: Testing Campaigns Before You Send Them

Post Syndicated from Zach Barbitta original https://aws.amazon.com/blogs/messaging-and-targeting/practice-makes-perfect-testing-campaigns-before-you-send-them/

In an article we posted to Medium in February, we talked about how to determine the best time to engage your customers by using Amazon Pinpoint’s built-in session heat map. The session heat map allows you to find the times that your customers are most likely to use your app. In this post, we continued on the topic of best practices—specifically, how to appropriately test a campaign before going live.

In this post, we’ll talk about the old adage “practice makes perfect,” and how it applies to the campaigns you send using Amazon Pinpoint. Let’s take a scenario many of our customers encounter daily: creating a campaign to engage users by sending a push notification.

As you can see from the preceding screenshot, the segment we plan to target has nearly 1.7M recipients, which is a lot! Of course, before we got to this step, we already put several best practices into practice. For example, we determined the best time to engage our audience, scheduled the message based on recipients’ local time zones, performed A/B/N testing, measured lift using a hold-out group, and personalized the content for maximum effectiveness. Now that we’re ready to send the notification, we should test the message before we send it to all of the recipients in our segment. The reason for testing the message is pretty straightforward: we want to make sure every detail of the message is accurate before we send it to all 1,687,575 customers.

Fortunately, Amazon Pinpoint makes it easy to test your messages—in fact, you don’t even have to leave the campaign wizard in order to do so. In step 3 of the campaign wizard, below the message editor, there’s a button labelled Test campaign.

When you choose the Test campaign button, you have three options: you can send the test message to a segment of 100 endpoints or less, or to a set of specific endpoint IDs (up to 10), or to a set of specific device tokens (up to 10), as shown in the following image.

In our case, we’ve already created a segment of internal recipients who will test our message. On the Test Campaign window, under Send a test message to, we choose A segment. Then, in the drop-down menu, we select our test segment, and then choose Send test message.

Because we’re sending the test message to a segment, Amazon Pinpoint automatically creates a new campaign dedicated to this test. This process executes a test campaign, complete with message analytics, which allows you to perform end-to-end testing as if you sent the message to your production audience. To see the analytics for your test campaign, go to the Campaigns tab, and then choose the campaign (the name of the campaign contains the word “test”, followed by four random characters, followed by the name of the campaign).

After you complete a successful test, you’re ready to launch your campaign. As a final check, the Review & Launch screen includes a reminder that indicates whether or not you’ve tested the campaign, as shown in the following image.

There are several other ways you can use this feature. For example, you could use it for troubleshooting a campaign, or for iterating on existing campaigns. To learn more about testing campaigns, see the Amazon Pinpoint User Guide.

AWS Online Tech Talks – May and Early June 2018

Post Syndicated from Devin Watson original https://aws.amazon.com/blogs/aws/aws-online-tech-talks-may-and-early-june-2018/

AWS Online Tech Talks – May and Early June 2018  

Join us this month to learn about some of the exciting new services and solution best practices at AWS. We also have our first re:Invent 2018 webinar series, “How to re:Invent”. Sign up now to learn more, we look forward to seeing you.

Note – All sessions are free and in Pacific Time.

Tech talks featured this month:

Analytics & Big Data

May 21, 2018 | 11:00 AM – 11:45 AM PT Integrating Amazon Elasticsearch with your DevOps Tooling – Learn how you can easily integrate Amazon Elasticsearch Service into your DevOps tooling and gain valuable insight from your log data.

May 23, 2018 | 11:00 AM – 11:45 AM PTData Warehousing and Data Lake Analytics, Together – Learn how to query data across your data warehouse and data lake without moving data.

May 24, 2018 | 11:00 AM – 11:45 AM PTData Transformation Patterns in AWS – Discover how to perform common data transformations on the AWS Data Lake.

Compute

May 29, 2018 | 01:00 PM – 01:45 PM PT – Creating and Managing a WordPress Website with Amazon Lightsail – Learn about Amazon Lightsail and how you can create, run and manage your WordPress websites with Amazon’s simple compute platform.

May 30, 2018 | 01:00 PM – 01:45 PM PTAccelerating Life Sciences with HPC on AWS – Learn how you can accelerate your Life Sciences research workloads by harnessing the power of high performance computing on AWS.

Containers

May 24, 2018 | 01:00 PM – 01:45 PM PT – Building Microservices with the 12 Factor App Pattern on AWS – Learn best practices for building containerized microservices on AWS, and how traditional software design patterns evolve in the context of containers.

Databases

May 21, 2018 | 01:00 PM – 01:45 PM PTHow to Migrate from Cassandra to Amazon DynamoDB – Get the benefits, best practices and guides on how to migrate your Cassandra databases to Amazon DynamoDB.

May 23, 2018 | 01:00 PM – 01:45 PM PT5 Hacks for Optimizing MySQL in the Cloud – Learn how to optimize your MySQL databases for high availability, performance, and disaster resilience using RDS.

DevOps

May 23, 2018 | 09:00 AM – 09:45 AM PT.NET Serverless Development on AWS – Learn how to build a modern serverless application in .NET Core 2.0.

Enterprise & Hybrid

May 22, 2018 | 11:00 AM – 11:45 AM PTHybrid Cloud Customer Use Cases on AWS – Learn how customers are leveraging AWS hybrid cloud capabilities to easily extend their datacenter capacity, deliver new services and applications, and ensure business continuity and disaster recovery.

IoT

May 31, 2018 | 11:00 AM – 11:45 AM PTUsing AWS IoT for Industrial Applications – Discover how you can quickly onboard your fleet of connected devices, keep them secure, and build predictive analytics with AWS IoT.

Machine Learning

May 22, 2018 | 09:00 AM – 09:45 AM PTUsing Apache Spark with Amazon SageMaker – Discover how to use Apache Spark with Amazon SageMaker for training jobs and application integration.

May 24, 2018 | 09:00 AM – 09:45 AM PTIntroducing AWS DeepLens – Learn how AWS DeepLens provides a new way for developers to learn machine learning by pairing the physical device with a broad set of tutorials, examples, source code, and integration with familiar AWS services.

Management Tools

May 21, 2018 | 09:00 AM – 09:45 AM PTGaining Better Observability of Your VMs with Amazon CloudWatch – Learn how CloudWatch Agent makes it easy for customers like Rackspace to monitor their VMs.

Mobile

May 29, 2018 | 11:00 AM – 11:45 AM PT – Deep Dive on Amazon Pinpoint Segmentation and Endpoint Management – See how segmentation and endpoint management with Amazon Pinpoint can help you target the right audience.

Networking

May 31, 2018 | 09:00 AM – 09:45 AM PTMaking Private Connectivity the New Norm via AWS PrivateLink – See how PrivateLink enables service owners to offer private endpoints to customers outside their company.

Security, Identity, & Compliance

May 30, 2018 | 09:00 AM – 09:45 AM PT – Introducing AWS Certificate Manager Private Certificate Authority (CA) – Learn how AWS Certificate Manager (ACM) Private Certificate Authority (CA), a managed private CA service, helps you easily and securely manage the lifecycle of your private certificates.

June 1, 2018 | 09:00 AM – 09:45 AM PTIntroducing AWS Firewall Manager – Centrally configure and manage AWS WAF rules across your accounts and applications.

Serverless

May 22, 2018 | 01:00 PM – 01:45 PM PTBuilding API-Driven Microservices with Amazon API Gateway – Learn how to build a secure, scalable API for your application in our tech talk about API-driven microservices.

Storage

May 30, 2018 | 11:00 AM – 11:45 AM PTAccelerate Productivity by Computing at the Edge – Learn how AWS Snowball Edge support for compute instances helps accelerate data transfers, execute custom applications, and reduce overall storage costs.

June 1, 2018 | 11:00 AM – 11:45 AM PTLearn to Build a Cloud-Scale Website Powered by Amazon EFS – Technical deep dive where you’ll learn tips and tricks for integrating WordPress, Drupal and Magento with Amazon EFS.

 

 

 

 

The intersection of Customer Engagement and Data Science

Post Syndicated from Brent Meyer original https://aws.amazon.com/blogs/messaging-and-targeting/the-intersection-of-customer-engagement-and-data-science/

On the Messaging and Targeting team, we’re constantly inspired by the new and novel ways that customers use our services. For example, last year we took an in-depth look at a customer who built a fully featured email marketing platform based on Amazon SES and other AWS Services.

This week, our friends on the AWS Machine Learning team published a blog post that brings together the worlds of data science and customer engagement. Their solution uses Amazon SageMaker (a platform for building and deploying machine learning models) to create a system that makes purchasing predictions based on customers’ past behaviors. It then uses Amazon Pinpoint to send campaigns to customers based on these predictions.

The blog post is an interesting read that includes a primer on the process of creating a useful Machine Learning solution. It then goes in-depth, discussing the real-world considerations that are involved in implementing the solution.

Take a look at their post, Amazon Pinpoint campaigns driven by machine learning on Amazon SageMaker, on the AWS Machine Learning Blog.

The End of Google Cloud Messaging, and What it Means for Your Apps

Post Syndicated from Zach Barbitta original https://aws.amazon.com/blogs/messaging-and-targeting/the-end-of-google-cloud-messaging-and-what-it-means-for-your-apps/

On April 10, 2018, Google announced the deprecation of its Google Cloud Messaging (GCM) platform. Specifically, the GCM server and client APIs are deprecated and will be removed as soon as April 11, 2019.  What does this mean for you and your applications that use Amazon Simple Notification Service (Amazon SNS) or Amazon Pinpoint?

First, nothing will break now or after April 11, 2019. GCM device tokens are completely interchangeable with the newer Firebase Cloud Messaging (FCM) device tokens. If you have existing GCM tokens, you’ll still be able to use them to send notifications. This statement is also true for GCM tokens that you generate in the future.

On the back end, we’ve already migrated Amazon SNS and Amazon Pinpoint to the server endpoint for FCM (https://fcm.googleapis.com/fcm/send). As a developer, you don’t need to make any changes as a result of this deprecation.

We created the following mini-FAQ to address some of the questions you may have as a developer who uses Amazon SNS or Amazon Pinpoint.

If I migrate to FCM from GCM, can I still use Amazon Pinpoint and Amazon SNS?

Yes. Your ability to connect to your applications and send messages through both Amazon SNS and Amazon Pinpoint doesn’t change. We’ll update the documentation for Amazon SNS and Amazon Pinpoint soon to reflect these changes.

If I don’t migrate to FCM from GCM, can I still use Amazon Pinpoint and Amazon SNS?

Yes. If you do nothing, your existing credentials and GCM tokens will still be valid. All applications that you previously set up to use Amazon Pinpoint or Amazon SNS will continue to work normally. When you call the API for Amazon Pinpoint or Amazon SNS, we initiate a request to the FCM server endpoint directly.

What are the differences between Amazon SNS and Amazon Pinpoint?

Amazon SNS makes it easy for developers to set up, operate, and send notifications at scale, affordably and with a high degree of flexibility. Amazon Pinpoint has many of the same messaging capabilities as Amazon SNS, with the same levels of scalability and flexibility.

The main difference between the two services is that Amazon Pinpoint provides both transactional and targeted messaging capabilities. By using Amazon Pinpoint, marketers and developers can not only send transactional messages to their customers, but can also segment their audiences, create campaigns, and analyze both application and message metrics.

How do I migrate from GCM to FCM?

For more information about migrating from GCM to FCM, see Migrate a GCM Client App for Android to Firebase Cloud Messaging on the Google Developers site.

If you have any questions, please post them in the comments section, or in the Amazon Pinpoint or Amazon SNS forums.

The Amazon SES Blog is now the AWS Messaging and Targeting Blog

Post Syndicated from Brent Meyer original https://aws.amazon.com/blogs/messaging-and-targeting/the-amazon-ses-blog-is-now-the-aws-messaging-and-targeting-blog/

Regular visitors to this blog may have noticed that its name has changed from the Amazon SES Blog to the AWS Messaging and Targeting Blog. The Amazon SES team has been working closely with the Amazon Pinpoint team in recent months, so we decided to create a single source of information for both products.

If you’re a dedicated Amazon SES user, don’t worry—Amazon SES isn’t going anywhere. However, as the goals of our two teams started to overlap more and more, we realized that we had lots of ideas for blog posts that would be relevant to users of both products.

If you’re not familiar with Amazon Pinpoint yet, allow us to make a brief introduction. Amazon Pinpoint was originally created to help mobile app developers analyze the ways that their customers used their apps, and to send mobile push messages to those users. Over time, the capabilities of Amazon Pinpoint grew to include the ability to send transactional messages (such as order confirmations, welcome messages, and one-time passwords), segment your audience, schedule campaign execution, and send messages using other channels (including SMS and email). In short, Amazon Pinpoint helps you deliver the right message to the right customers at the right time using the right channel.

In the past, this blog focused mainly on providing information about new features and common issues. Our new blog will include that same information, as well as practical tips, industry best practices, and the exciting things our customers have done using Amazon SES and Amazon Pinpoint. We hope you enjoy it!

If you have any questions, or if there’s anything you’d like to see us cover in the blog, please let us know in the comments section.

AWS Pinpoint Launches Two-Way Text Messaging

Post Syndicated from Randall Hunt original https://aws.amazon.com/blogs/aws/aws-pinpoint-launches-two-way-text-messaging/

Last week Amazon Pinpoint launched AWS Global SMS two-way text messaging and we didn’t get an opportunity to cover the launch. AWS Pinpoint users can now programmaticaly respond to their end-users’ text messages. Users can provision both short codes and long codes (10-digit phone numbers) which send inbound messages to an SNS topic. Let’s take a look.

First I’ll navigate to the Pinpoint console where I’ll use the “Create a project in Mobile Hub” button in the top right corner. I’ll follow the steps in the wizard until the project is created.

Next, in the Pinpoint console I’ll click “Account Settings” in the top-right of the console window.

At the bottom of the Account Settings page there is a “Number Settings” section. If you don’t already have any short codes or long codes provisioned you’ll have to open a support ticket to request one. It can take multiple weeks for a short code to be approved by all carriers. Long codes are typically easier to provision.

Since I already have a few numbers provisioned I’ll use one of them now by clicking on it which brings me to that number’s configuration page.

Here I’ll enable 2-way SMS and create an SNS topic for messages.

I could create a quick lambda function to trigger on the SNS topic messages and then respond again with pinpoint.


import boto3
pinpoint = boto3.client('pinpoint')


def lambda_handler(event, context):
    pinpoint.send_messages(
        ApplicationId='557d87b57bdb499f8b5eef575435d3b8',
        MessageRequest={
            'Addresses': {
                event['Records'][0]['Sns']['originationNumber']: {'ChannelType': 'SMS'}
            },
            'MessageConfiguration': {
                'SMSMessage': {
                    'Body': 'Vim is the best!',
                    'MessageType': 'TRANSACTIONAL'
                }
            }
        }
    )

But pinpoint is extremely full-featured and you’re not limited to this simple message type. You can define rich messaging campaigns with various substitutions based on stored user data.

SMS is an area of continued investment for AWS so you can expect to see more advances and improvements as customers give us feedback on these new features. Let us know if you build anything cool with this!

Useful Links

AWS Webinars – January 2017 (Bonus: December Recap)

Post Syndicated from Jeff Barr original https://aws.amazon.com/blogs/aws/aws-webinars-january-2017-bonus-december-recap/

Have you had time to digest all of the announcements that we made at AWS re:Invent? Are you ready to debug with AWS X-Ray, analyze with Amazon QuickSight, or build conversational interfaces using Amazon Lex? Do you want to learn more about AWS Lambda, set up CI/CD with AWS CodeBuild, or use Polly to give your applications a voice?

January Webinars
In our continued quest to provide you with training and education resources, I am pleased to share the webinars that we have set up for January. These are free, but they do fill up and you should definitely register ahead of time. All times are PT and each webinar runs for one hour:

January 16:

January 17:

January 18::

January 19:

January 20

December Webinar Recap
The December webinar series is already complete; here’s a quick recap with links to the recordings:

December 12:

December 13:

December 14:

December 15:

Jeff;

PS – If you want to get a jump start on your 2017 learning objectives, the re:Invent 2016 Presentations and re:Invent 2016 Videos are just a click or two away.

Amazon Pinpoint – Hit your Targets with AWS

Post Syndicated from Jeff Barr original https://aws.amazon.com/blogs/aws/amazon-pinpoint-hit-your-targets-with-aws/

My colleague Georgie Matthews wrote the guest post below to introduce you to Amazon Pinpoint, a new service that helps you to measure and improve user engagement for your mobile apps.

Jeff;


Our mobile customers have told us how expensive it can get to acquire new users for their apps. Then there is the challenge of retaining those users and encouraging them to use the app frequently.  To help keep users coming back, app companies run engagement campaigns using push notifications. These campaigns can vary depending on the app. For example, game developers may send users an in-app notification with new level hints and bonuses if they are stuck on one level for too long, or retailers send users promotional information in the event of a sale or if they haven’t opened the app recently.

Measuring and constantly improving targeted push notification campaigns is essential to increasing user engagement. Sending too many, or untimely notifications can cause users to turn them off or even uninstall the app. Push notification campaigns that are targeted based on app usage trends and user behavior increases message relevance and effectiveness, while helping app developers define and measure messaging benchmarks for campaigns.

Previously, if you wanted to engage users with targeted push notification campaigns, you either used a third-party service, or you had to build your own targeting solutions. Building your own in-house campaign management solution also meant you had to manage scalability, feature support, and maintenance.

Introducing Amazon Pinpoint
Today we are launching Amazon Pinpoint, a new service that t makes it easy to run targeted campaigns to improve user engagement. Pinpoint helps you understand your users’ behavior, define who to target, what messages to send, when to deliver them, and tracks the results of the campaign.

Pinpoint enables real-time analytics with dashboards for analyzing user engagement, monetization, user demographics, custom events, and funnels so you can understand how users engage with your application. You can analyze and understand your user data by drilling down based on the segments you’ve defined, segmentation attributes, or time.

With Pinpoint, you can define target segments from a variety of different data sources. You can identify target segments from app user data collected in Pinpoint. You can build custom target segments from user data collected in other AWS services such as Amazon S3 and Amazon Redshift, and import target user segments from third party sources such as Salesforce via S3.

Once you define your segments, Pinpoint lets you send targeted notifications with personalized messages to each user in the campaign based on custom attributes such as game level, favorite team, and news preferences for example. Amazon Pinpoint can send push notifications immediately, at a time you define, or as a recurring campaign. By scheduling campaigns, you can optimize the push notifications to be delivered at a specific time across multiple time zones. For your marketing campaigns Pinpoint supports Rich Notifications to enable you to send images as part of your campaigns. We also support silent or data notifications which allow you to control app behavior and app config on the background.

Once your campaign is running, Amazon Pinpoint provides metrics to track the impact of your campaign, including the number of notifications received, number of times the app was opened as a result of the campaign, time of app open, push notification opt-out rate, and revenue generated from campaigns. You can also export the resulting event data and run custom analytics using your existing analytics systems. You can also A/B test different messages, track results, and then send the best message to your target segment.

With Pinpoint there is no minimum fee, no setup cost and no fixed monthly cost based on your total user pool. You only pay for the number of users you target or collect events from, the messages you send, and events you collect, so you can start small and scale as your application grows.

Now lets take a look at how Pinpoint makes it easy to setup a campaign.

Create a new Mobile Hub project from the AWS Mobile Hub console:

Choose Add User Engagement and enable app and campaign analytics by clicking Enable Engagement and add your GCM/FCM and APNS credentials.

See integration steps for User Engagement within the Integrate section of Mobile Hub.

Once you are completed with integration steps in Mobile Hub. Next, head over to the Pinpoint console where you will see your app live.

Click on CampaignsCreate Campaign:

Leave Standard Campaign selected and Click on Segment to define your targeting criteria:

Click on Message, type in a message and click Schedule:

Choose Immediate from the drop down, click Review and Launch and then finally Launch Campaign.

You can also view your app analytics with Pinpoint using the Pinpoint Analytics dashboard:

Pricing and Availability
We are launching Amazon Pinpoint today in the US East (Northern Virginia) Region, and plan to expand it to other regions in the near future. Let us know what you think!

Georgie Matthews, Senior Product Manager