AWS and Unity integration methods

There are various approaches to ingesting data to your analytics pipeline on AWS and integrating backend AWS services to a game client. The two main approaches are:

1. Proxy integration with an API

You can integrate backend AWS resources and send data to AWS using a proxy endpoint such as an HTTP or REST API Gateway, which has already been explored in this lab. This will act as a “front door” to your AWS resources and provide an additional layer of security. However, it also is an added cost. This first method is useful if you have a game backend (such as Lambda, EC2, containers, or another form of game servers for example) from which you can make SDK calls from instead of making them directly from the game client.

2. Direct SDK integration

The other method is directly integrating with AWS services using the SDK. Since Unity uses #C, you can use the AWS SDK for .NET. This way, you can write directly to Amazon Kinesis using one of the supported SDK calls, such as a PutRecord method. This removes the extra cost of API Gateway but requires you to secure your SDK calls in the game client. SDK calls require IAM credentials, so you must securely manage and rotate these IAM credentials using an authentication service such as Cognito as opposed to embedding credentials or private keys directly in the game client. This second method is useful if you are a mobile game developer or are developing a game without an existing backend.

This workshop will cover both approaches for integrating an analytics pipeline with Unity. Direct SDK integration will be covered in section 5 and proxy integration will be covered in section 6.