Automated Deployment - Digital User Engagement Events Database

Automated Deployment

Before you launch the automated deployment, please review the architecture, configuration, storage security, and other considerations discussed in this guide. Follow the step-by-step instructions in this section to configure and deploy this solution into your account.

Time to deploy: Approximately 5 minutes

Prerequisites

There are no required prerequisites for this solution; however, if you wish to deploy this solution to an existing Amazon Pinpoint project or utilize existing Amazon Simple Email Service (Amazon SES) configuration sets, then you must make some customizations before you launch.

Prepare an existing Amazon Pinpoint project for this solution

Use the following procedure to remove the event stream configuration of an existing Amazon Pinpoint project.

  1. Navigate to the Amazon Pinpoint console.

  2. In the All projects section, choose the project you wish to configure.

  3. In the navigation pane, select Settings, Event stream.

  4. If the event stream is currently enabled, select Edit (on the upper-right corner of the Services card).

  5. Uncheck Stream to Amazon Kinesis and choose Save to disable the configuration.

  6. In the navigation pane, select Settings, General settings, and note the Project ID. You will need this identifier in Step 1.

    Note

    Enter the project identifier as the value for the Amazon Pinpoint Project ID parameter. In Amazon Pinpoint, a project is the same as an application. This solution uses the term Project ID instead of Application ID.

Gather the existing Amazon SES configuration sets names

To configure Amazon Simple Email Service (Amazon SES) to use the same events database, complete the following steps.

  1. Navigate to the Amazon Simple Email Service console.

  2. In the navigation pane, select Configuration Sets.

  3. Make note of all of the Configuration Set Names that you want this solution to update in order to report the events in the events database. These names will be used in Step 1.

What We'll Cover

The procedure for deploying this architecture on AWS consists of the following steps. For detailed instructions, follow the links for each step.

Step 1. Launch the stack

  • Launch the AWS CloudFormation template into your AWS account.

  • Review the template parameters and adjust, if necessary.

Step 2. Verify with Amazon Athena

  • Verify that the all_events table successfully deployed.

  • Verify that the individual event views successfully deployed.

Step 1. Launch the stack

This automated AWS CloudFormation template deploys the Digital User Engagement Event Database solution in the AWS Cloud.

Note

You are responsible for the cost of the AWS services used while running this solution. See the Cost section for more details. For full details, see the pricing webpage for each AWS service you will be using in this solution.

  1. Sign in to the AWS Management Console and use the button below to launch the AWS CloudFormation template.

    
                                Digital User Engagement Events Database launch
                                    button

    You can also download the template as a starting point for your own implementation.

  2. The template launches in the US East (N. Virginia) Region by default. To launch this solution in a different AWS Region, use the Region selector in the console navigation bar.

    Note

    This solution uses Amazon Pinpoint and Amazon Simple Email Service (Amazon SES), which are currently available in specific AWS Regions only. Therefore, you must launch this solution in an AWS Region where both Amazon Pinpoint and Amazon SES are available. For the most current availability by AWS Region, see AWS service offerings by Region.

  3. On the Create stack page, verify that the correct template URL shows in the Amazon S3 URL text box and choose Next.

  4. On the Specify stack details page, assign a name to your solution stack.

  5. Under Parameters, review the parameters for the template and modify them as necessary. This solution uses the following parameters.

    Parameter Default Description
    Amazon Pinpoint Project ID (Optional) <optional input>

    The project ID is only applicable if deploying this solution to update an existing Amazon Pinpoint project. Leaving this blank will cause the solution to create a new Amazon Pinpoint project.

    Note: If specifying an existing Amazon Pinpoint project, ensure that the event stream configuration has been removed according to the Prerequisites section.

    Amazon Pinpoint Project Name My Pinpoint Project If the Amazon Pinpoint Project ID (Optional) parameter is left blank, provide a name for this parameter and this solution will create an Amazon Pinpoint project using that name.
    Existing Amazon Simple Email Service Configuration Set Names <optional input>

    Comma delimited list of existing Amazon SES set names for this solution to update and send email events to the new events database. Leave blank to not update any configuration sets.

    Note: If applicable, remove any Amazon Pinpoint event destinations currently configured in the configuration sets specified.

    Amazon Athena / AWS Glue Database Name due_eventdb Name of the database available in AWS Glue and Amazon Athena where the required schemas are registered. Only lower case and the underscore (_) characters are allowed.
  6. Choose Next.

  7. On the Configure stack options page, choose Next.

  8. On the Review page, review and confirm the settings. Check the box acknowledging that the template might create AWS Identity and Access Management (IAM) resources.

  9. Choose Create stack to deploy the stack.

    You can view the status of the stack in the AWS CloudFormation console in the Status column. You should see a status of CREATE_COMPLETE in approximately 5 minutes.

    Note

    In addition to the AthenaPartitionLambda AWS Lambda function used to repartition the Amazon Athena table, two additional Lambda functions, CustomResourceHelper and CustomBucketNameHelper, run only during initial configuration or when resources are updated or deleted.

    When running this solution, you will see all three Lambda functions in the AWS Console, but only the AthenaPartitionLambda Lambda function is regularly active. Do not delete the CustomResourceHelper or CustomBucketNameHelper functions—they are necessary to manage associated resources.

Step 2. Verify with Amazon Athena

After the events database stack launch completes, verify that the database, table, and views were set up correctly using Amazon Athena.

  1. Navigate to the Amazon Athena console.

  2. Under the Database dropdown, select the database name you provided earlier in Step 1.

  3. Verify that the all_events table was created. This table contains all event data emitted from Amazon SES and Amazon Pinpoint.

  4. Verify that the views found in the data dictionary in Appendix A were all created successfully.