Demo using API Gateway and Lambda with Protocol Buffer
Demo using API Gateway and Lambda with Protocol Buffer.
In this demo you'll find 3 handlers:
application/x-protobuffor this to work otherwise API Gateway just returns the base64 string instead
Acceptheader to decide whether to return JSON or protocol buffer, and return
406 Not Acceptableif the
Acceptheader is neither
For more details, please read this blog post.
If you're on Linux, run
If you're not on Linux, run
docker for deployment? Because the
protobufjs library used to encode
Protocol Buffer messages has a dependency that is distributed as a native
binary. So in order to get the right version you need to run grab the dependency
on a Linux system,
docker provides a nice abstraction to do that.