News

AWS Simplifies API Gateway for Cloud Developers

Amazon Web Services Inc. (AWS) yesterday announced enhancements to its Amazon API Gateway to simplify API-based development in its cloud platform.

As AWS spokesperson Jeff Barr explained in a post last year, the Amazon API Gateway is used to build and manage scalable back-ends for mobile, Web and other apps. It was introduced last year along with a host of other services during an AWS Summit. Like popular Mobile Back-End-as-a-Service (MBaaS) offerings, it provides infrastructure services such as authorization, access control, traffic management, monitoring, analytics and version management.

The service's Web site provides more details:

Amazon API Gateway is a fully managed service that makes it easy for developers to create, publish, maintain, monitor, and secure APIs at any scale. With a few clicks in the AWS Management Console, you can create an API that acts as a 'front door' for applications to access data, business logic, or functionality from your back-end services, such as workloads running on Amazon Elastic Compute Cloud (Amazon EC2), code running on AWS Lambda or any Web application.

Yesterday, Barr outlined enhancements to the API gateway.

"We are extending the integration model provided by API Gateway with support for some new features that will make it even easier for you to build new API endpoints and to port existing applications," Barr said.

Before diving in to the nuts-and-bolts functionality of the new features, Barr provided handy capsule summations of each one:

  • Catch-all Path Variables -- Instead of specifying individual paths and behaviors for groups of requests that fall within a common path (such as /store/), you can now specify a catch-all route that intercepts all requests to the path and routes them to the same function. For example a single greedy path (/store/{proxy+}) will intercept requests made to /store/list-products, /store/add-product and /store/delete-product.
  • ANY Method -- Instead of specifying individual behaviors for each HTTP method (GET, POST, PUT and so forth) you can now use the catch-all ANY method to define the same integration behavior for all requests.
  • Lambda Function Integration -- A new default mapping template will send the entire request to your Lambda function and then turn the return value into an HTTP response.
  • HTTP Endpoint Integration -- Another new default mapping template will pass the entire request through to your HTTP endpoint and then return the response without modification. This allows you to use API Gateway as an HTTP proxy with very little in the way of setup work.

For the uninitiated, Barr also provided a handy glossary of terms needed to fully understand the new features:

  • Endpoint -- A URL (provided by API Gateway) that responds to HTTP requests. These requests use HTTP methods such as GET, PUT and POST.
  • Resource –- A named entity that exists (symbolically) within an endpoint, referred to by a hierarchical path.
  • Behavior -- The action that your code will take in response to an HTTP request on a particular resource, using an HTTP method.
  • Integration -- The API Gateway mapping from the endpoint, resource and HTTP method to the actual behavior, and back again.

The new features are available now at no extra charge for the pay-as-you-go service.

Interested developers can learn more in the Amazon API Gateway Developer Guide.

About the Author

David Ramel is an editor and writer for Converge360.

Featured

Subscribe on YouTube