AWS API Gateways can return mock responses

aws

The API Gateway Pattern is a way to provide a single entry point for clients to your microservices backend.

You might use AWS API Gateways so that your mobile application can reach your backend services.

You might not know that you can set up mock integrations that return mostly static responses. There’s also some basic functionality to conditionally send different responses:

{
  #if( $input.params('scope') == "internal" )
    "statusCode": 200
  #else
    "statusCode": 500
  #end
}

Mock integrations let your mobile team develop and hit the real API Gateway while your backend team builds the features.


Like what you've read?

If you're an engineering leader or developer, you should subscribe to my 80/20 DevOps Newsletter. Give me 1 minute of your day, and I'll teach you essential DevOps skills. I cover topics like Kubernetes, AWS, Infrastructure as Code, and more.

Not sure yet? Check out the archive.

Unsubscribe at any time.