HTTP API

Understand HTTP API and its comparison with the REST API.

HTTP vs. REST API

HTTP APIs in the AWS API Gateway started as an alternative to the REST API. A cheaper, faster alternative with reduced functionality. Initially, it allowed only Lambda functions and external HTTP integration.

Over the years, it has gathered a lot of functionality and is popular in serverless deployments. If we don’t plan to use the REST API functionality, we should use the HTTP API. Better still, we can use the REST API and the power that it offers.

The HTTP, as well as the REST API in the AWS API Gateway, are technically REST APIs that use the HTTP protocol. Their names don’t indicate the difference in technology underneath.

A sample implementation

As we can see in the CloudFormation template below, HTTP API is much simpler and more manageable. However, it lacks some of the power of the REST API. This one integrates the request to an external API.

Get hands-on with 1200+ tech skills courses.