Roll your own API in Amazon's cloud

Amazon's API Gateway joins the parade of proprietary services for building and managing APIs

APIs are meant to be kept simple and lean, but the process of developing them often involves a lot of work. Not just with the underlying programming, but the surrounding infrastructure -- dealing with rate limiting, managing security, and so on.

Amazon's API Gateway service makes it the latest to join the parade of those offering better ways to assemble and manage APIs. The main selling point, apart from integration with its other services, is that it's a "server-less" way to do APIs.

More API, less infrastructure

API Gateway allows a developer to define an API, either by hand or using the Swagger definition system. The resulting API can have its methods linked to an endpoint anywhere within AWS or any publicly accessible, pre-defined endpoint -- e.g., existing legacy APIs.

Each method can be rate-limited by method or by specific API keys and can be versioned, with different versions running in parallel if needed. Metrics are piped to Amazon CloudWatch, and services like auto-generation of SDK and API keys are also built-in.

The service also helps developers build APIs with less actual infrastructure. One possible endpoint for API Gateway is Amazon's AWS Lambda, where snippets of Java and Node.js code can be executed in response to requests.

To that end, a prospective API creator wouldn't need to spin up infrastructure, such as a front end server running Nginx. This approach means being able to instantiate APIs faster, but at the cost of near-total dependency on Amazon's internal structure.

Other ways abound, too

Amazon's offering is not the first of its kind. IBM recently whipped the drapes off its Bluemix-PaaS-powered API Management service, promoted strongly as a way to both create new APIs from scratch in the cloud and outfit existing ones with better management controls. The API Management offering for Microsoft Azure also offers similar features.

The three diverge most markedly in pricing. Amazon charges $3.50 per million API calls received, plus charges for data transfer (per GB) and caching (per GB per hour). IBM's offering provides the first 5,000 calls for free ($5.65 for the next 100,000) and adds storage charges on top of that. Microsoft begins at $1.58/day for 32K API calls and 161MB of data transfer, with 10MB of cache included.

Another point of competition for Amazon will be other services that offer the same benefits -- typically run on one's own services, but without requiring a commitment to Amazon's platform. 

Tyk has an offering in that vein, with many of the same benefits as API Gateway -- management, monitoring, integration with existing API development tools -- but as both a cloud-hosted and self-hosted solution, built as open source (under the Mozilla Public License) using Golang.

Likewise, Mashape's Kong also offers a common front end for building APIs, built using the open source Nginx Web server. Mashape has plans to monetize that stack as well, but via commercial plug-ins and support rather than as a hosted service.

This story, "Roll your own API in Amazon's cloud" was originally published by InfoWorld.