REST to gRPC: Google API Gateway Vs AWS API Gateway

Uncategorized


Google API Gateway supports REST → gRPC transcoding out of the box.
AWS API Gateway does NOT provide equivalent REST → gRPC transcoding out of the box.
On AWS, you must add a translation layer (Envoy or grpc-gateway) to achieve the same behavior.

That’s the core conclusion of the spike.


What “out of the box” really means (important)

Google Cloud API Gateway

GCP API Gateway:

  • Accepts REST/JSON
  • Reads proto descriptors
  • Applies HTTP mapping rules
  • Converts JSON → Protobuf
  • Sends gRPC over HTTP/2
  • Returns HTTP responses

👉 You do not deploy or manage a gateway service.
The transcoder is managed by Google.

That’s exactly what your Terraform is doing today:

  • Upload proto descriptors
  • Define http_mapping_rules
  • Point to grpcs://...a.run.app

No extra pods. No custom gateway.


AWS API Gateway

AWS API Gateway:

  • Is primarily a REST / HTTP API gateway
  • Can proxy HTTP and integrate with Lambda
  • Can proxy gRPC in limited scenarios
  • Does not read proto descriptors
  • Does not transcode JSON → Protobuf
  • Does not map REST paths to gRPC methods

👉 There is no native feature in AWS API Gateway equivalent to GCP’s gRPC transcoding.

So if a browser sends:

DELETE /v1/user

AWS API Gateway has no idea:

  • which gRPC method to call
  • how to encode the request
  • how to produce Protobuf

What you must do in AWS instead

Because ALB and AWS API Gateway don’t do transcoding, you add one explicit translation layer:

REST client
   ↓
ALB or AWS API Gateway
   ↓
Envoy OR grpc-gateway   ← this replaces GCP API Gateway’s transcoder
   ↓
gRPC service
Code language: JavaScript (javascript)

Envoy / grpc-gateway:

  • reads the proto
  • converts REST → Protobuf
  • sends a proper gRPC request

Why AWS designed it this way (context)

This is not a “missing feature” by accident.

  • AWS tends to keep infrastructure layers simpler
  • Advanced protocol translation is expected to live in:
    • Envoy
    • application gateways
    • service mesh (App Mesh)

GCP chose to productize gRPC transcoding inside API Gateway.

Different philosophies.


One sentence you can safely say in the workshop

“In GCP, REST-to-gRPC transcoding is a managed feature of API Gateway.
In AWS, there is no equivalent managed feature, so we need to run a translator such as Envoy or grpc-gateway in front of our gRPC services.”

That statement is technically correct and defensible.


Practical recommendation (final)

  • For AWS + EKS + ALB, the closest equivalent to GCP API Gateway is:
    • Envoy with gRPC-JSON transcoder
  • grpc-gateway is a valid alternative when you prefer code-generated gateways.

Leave a Reply