Amazon API Gateway Pricing: A Comprehensive Guide
Introduction to Amazon API Gateway
API Gateway is a managed service that makes it easier to manage the APIs (creating, publishing, and maintaining secure APIs). API gateway is one of the pillars of the microservices and serverless architectures.
Benefits of Amazon API Gateway
Some of the main benefits of using Amazon API Gateway are:
- Cost: API Gateway uses a pay as you go model so customers only pay for the APIs used. There are no minimum fees or upfront commitments.
- Fully Managed: API Gateway is a fully managed service so customers can focus on building their applications instead of having manage critical infrastructure themselves.
This article is a great resource for learning more about API Gateway.
Pricing
Amazon API Gateway supports the following flavors of the API Gateway:
- REST APIs
- HTTP APIs
- Websocket APIs
This article is a good resource for learning about the differences between REST and HTTP APIs.
Amazon API Gateway Free Tier
API Gateway provides a free tier which is only available to new customers and is available for 12 months after the initial sign-up date. After this time period, customers pay the regular rate for the services.
The free tier benefits are as follows:
- REST API: 1 million API calls received
- HTTP API: 1 million API calls received
- Websocket API: 1 million messages and 750,000 connection minutes
Regular API Gateway rates are charged once usage exceeds these thresholds.
Next, we will look at the pricing for the different types of API Gateway services:
HTTP APIs
HTTP APIs are charged based on the number of API calls made. For e.g. this is the pricing in US East (N. Virginia)
Number of requests(per month) | Price(per million) |
---|---|
First 300 million | $1.00 |
300+ million | $0.90 |
Important: API Gateway billing is always pro-rated. If you make less than 300 million API requests, you will be charged exactly for the amount of API requests made.
REST APIs
REST APIs are also charged based on the number of API calls made. For e.g. the table below shows the current pricing in US East (N.Virginia):
Number of requests(per month) | Price(per million) |
---|---|
First 333 million | $3.50 |
Next 667 million | $2.80 |
Websocket APIs
Websocket APIs are charged based on the number of messages sent and received as well as the total number of connection minutes. Messages are metered in 32 KB increments.
The table below shows the current pricing for messages in US East (N.Virginia):
Number of requests(per month) | Price(per million) |
---|---|
First 1 billion | $1.00 |
Over 1 bmillion | $0.80 |
Connection Minutes are charged at $0.25 per million connection minutes
Additional Charges
REST APIs provide the ability to provision a dedicated cache to improve the performance. The pricing for the Cache is based on the amount of memory provisioned.
There might also be other additional charges depending on how API Gateway is being used such as:
- Data transfer
- Lambda
- Cloudwatch
Conclusion
Amazon API Gateway is one of the most popular serverless services from Amazon. Customers are charged based on a pay as you go model which is very cost efficient for customers.