AWS Api Gateway AWS_IAM authentication + Unity 3D signed request example




Since AWS still doesn’t have C# dot net SDK generation for Api Gateway (I hope they will have soon), I’ve created a simple example of a very abstract message board using Unity 3D as client and a simple Serverless Framework based backend.

The flow is simple:

  1. Client logs in to Facebook and requests a token.
  2. Using Cognito Federated Identity Provider + Facebook token gets credentials
  3. Using the credentials, a signed https request is sent to the Api Gateway endpoint which is set to “Invoke with caller credentials” (AWS_IAM auth).

The example consists of two parts:
A) Serverless backend: serverless-auth-msg-board
B) Unity 3D Client: serverless-auth-msg-board-unity3d-client

This is still work in progress, I’ve implemented to Create message function, but it does show the complete flow. I’ll update soon the Retrieve, Update and Delete functions. But to understand the flow the Create function is good enough.

I’ll be happy to help with more explanations if needed, as it would help improve the readme file.