Gaming Analytics Pipeline
Gaming Analytics Pipeline

Automated Deployment

Before you launch the automated deployment, please review the considerations and prerequisites discussed in this guide. Follow the step-by-step instructions in this section to configure and deploy the Gaming Analytics Pipeline into your account.

Time to deploy: Approximately 20 minutes

Prerequisites

Before you start, you must have an Amazon Elastic Compute Cloud (Amazon EC2) keypair and a data producer that can call the Amazon Kinesis PutRecord and/or PutRecords operation(s), and that produces records in the required format in the AWS Region where you will deploy this solution.

The solution’s sample data generator is installed on an Amazon EC2 instance. To use the data generator, you must have a Remote Desktop Protocol (RDP) client to connect to the sample data generator instance. For more information, see Connecting to Your Windows Instance in the Amazon EC2 User Guide.

Step 1. Launch the Stack

This automated AWS CloudFormation template deploys the Gaming Analytics Pipeline.

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 click the button below to launch the gaming-analytics-pipeline AWS CloudFormation template.

    
                                Launch button for Gaming Analytics Pipeline stack

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

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

  3. On the Select Template page, verify that you selected the correct template and choose Next.

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

    Note

    This solution uses the stack name to name the Amazon Simple Storage Service (Amazon S3) bucket. Therefore, the stack name must follow the rules for Amazon S3 bucket naming. For more information, see Bucket Restrictions and Limitations in the Amazon S3 Developer Guide.

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

    Parameter Default Description
    Root Username <Requires input> The Amazon Redshift username for solution set up
    Root Password <Requires input> The Amazon Redshift password for solution set up. The password must contain a lowercase character, an uppercase character, and a number.
    Worker Password <Requires input> The Amazon Redshift password for the analytics_worker user. The password must contain a lowercase character, an uppercase character, and a number.
    ReadOnly Password <Requires input> The Amazon Redshift password for the analytics_ro user. The password must contain a lowercase character, an uppercase character, and a number.
    Solution Mode Demo Select the version of the solution to deploy. Choose Demo or Prod.
    Tools Instance Key <Requires input> Public/private key pair, which allows you to connect securely to your instance after it launches. When you created an AWS account, this is the key pair you created in your preferred region.
    Tools Instance CIDR <Requires input> The CIDR block that determines which IP address ranges can access to the Amazon EC2 instance for the data and heat map generators
  6. Choose Next.

  7. On the Options page, choose Next.

  8. On the Review page, review and confirm the settings. Be sure to check the box acknowledging that the template will create AWS Identity and Access Management (IAM) resources.

  9. Choose Create 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 roughly 20 minutes.

Note

This solution includes the solution-helper AWS Lambda function, which runs only during initial configuration or when resources are updated or deleted.

When running this solution, the solution-helper Lambda function is inactive. However, do not delete the solution-helper function as it is necessary to manage associated resources.

Step 2. Install and Run the Data Generator (Optional)

Before you install the data generator, you must decrypt your Windows password, and connect to your Windows instance.

To install the data generator, complete the following steps:

  1. Open cmd.exe and type powershell.

  2. At the command prompt, enter cd C:\Users\Administrator\Desktop\data-generator\.

  3. Enter pip install --upgrade -r .\requirements.txt.

  4. Navigate to the Gaming Analytics Pipeline stack Outputs tab and copy the Value of the GenerateDataCommand.

  5. At the command prompt, paste the command and run it.

When you deploy the solution in Demo mode, data will be processed in minutes. When you deploy the solution in Prod mode, data can take up to 20 minutes to be processed.

For more information about the data generator, see Appendix A.

Step 3. Install and Run the Heat Map Generator

Before you install the data generator, you must decrypt your Windows password, and connect to your Windows instance.

To install the data generator, complete the following steps:

  1. Open cmd.exe and type powershell.

  2. At the command prompt, enter cd C:\Users\Administrator\Desktop\heatmap-generator\.

  3. Enter pip install --upgrade -r .\requirements.txt.

  4. Navigate to the Gaming Analytics Pipeline stack Outputs tab and copy the Value of the GenerateHeatmapCommand.

  5. At the command prompt, paste the command and run it.

Note that the heat map generator will cause an error if the database does not contain data, and that the heat maps are generated from the event_type parameter in the pre-built data file. For more information about the heat map generator, see Appendix B.