Amazon API Gateway Pricing Guide - Calculate Your Costs

This content was last reviewed on: 
November 30, 2022

What is the Amazon API Gateway?

APIs act as entry points for applications to access and process data based on business logic or functionality from backend services, such as secured data storage.

The Amazon API Gateway is a managed service for software developers to design, create, maintain, monitor, publish, and secure application programming interfaces (APIs) between a client and a collection of backend services.

While hosting large-scale APIs, you may use authentication and rate-limiting features to protect your APIs from possible abuse or overuse. Analytics and monitoring tools can show how people graphically use your APIs, allowing you to earn revenue from your API.

You could adopt a microservices architecture if you need a single request to call multiple distinct applications.

In this post, we cover how to calculate and optimize your Amazon API Gateway costs:

Curious if Amazon API Gateway is right for you? Get a report on the best API gateway tailored to your exact use case.
Get My Free API Gateway Evaluation
It takes 5 minutes.

Amazon (AWS) API Gateway Cost Calculator

Amazon API Gateway’s pricing depends on the type of API service offered—HTTP API, REST API, and WebSocket API. A typical use case requires millions, if not billions of calls, making the monthly cost quite variable.

Key inputs for your calculations:

  • There is no upfront commitment or minimum fees for Amazon API Gateway. You only pay when your API is called, and data is transferred out.
  • The fee is $0.90 per 1 million HTTP requests after the first 300M requests, whereas the fee is roughly the same for the WebSocket API, and more than triple that for REST API.
  • The AWS Free Tier has no cost for 1 million HTTP calls per month.
  • For WebSocket APIs, the Amazon API Gateway Free Tier includes one million messages (sent or received) and 750,000 connection minutes for up to 12 months.

Other Related AWS Costs Beyond the Amazon API Gateway

You may trigger data transfer and other costs related to other services on AWS:

  • Amazon API Gateway pricing is designed such that customers are charged a data transfer fee by AWS. Data transfer can occur between the internet and AWS; the internet service charges are specific to the originating region.
  • Amazon CloudFront's features include low API requests and response latency due to a global network of edge locations, traffic throttling, and API call authorization.
  • Using Amazon CloudWatch, the API Gateway dashboard provides information on API call performance metrics, data latency, and error or exception rates.
  • AWS identity and access management (IAM) and Amazon Cognito can be used to authorize access to your APIs by executing an AWS lambda.
  • With the help of AWS PrivateLink, you can connect AWS services, VPCs, and on-premises networks privately without exposing your traffic to the public internet.
  • Data transfer charges for data with Amazon databases like Amazon DynamoDB, Redshift, and DocumentDB are separately charged as data transfer charges.

How To Reduce Amazon API Gateway Costs - Top Cost Optimization Tips

Select a cheaper API gateway (e.g., HTTP)

Amazon API Gateway’s costs depend on what type of API gateway you selected. You can optimize the charges for API Gateway by selecting the right API gateway. When HTTP API and REST API are compared, AWS HTTP API has limited functionality but is much cheaper when compared to the REST API.

Use AWS service proxy integrations

Using AWS service proxy integrations instead of adding a Lambda function to transfer input data from the client would reduce costs as otherwise, you would be paying for your Lambda to run logic that API Gateway could do for free. Amazon API Gateway can be integrated with other AWS services such as DynamoDB, Kinesis, SQS, SNS, with features like API Gateway integration and serverless API gateway service proxy plugin for the serverless framework.

Remove unnecessary API calls

You can remove unnecessary API calls and optimize your system to prevent generating them. The application should be free from redundant and unnecessary API calls that will reduce our costs substantially.

Use ALB as you scale up

As your application's call volume increases, replace API Gateway with Application Load Balancer (ALB), which internally triggers a Lambda function.

Amazon API Gateway FAQ

Question: Is Amazon's API Gateway service free?

Answer: No, Amazon API Gateway is a pay-per-use service from AWS with a generous free tier that includes 1 million REST API calls, HTTP API calls and messages, and 750,000 connection minutes for free. For most production use cases, this is insufficient. However, attempting to check on the number of products hitting the endpoint can reduce what you’re charged to the bare minimum.

Question: Is Amazon API Gateway expensive?

Answer: Amazon API Gateway is the most expensive service in a serverless architecture. However, it depends on how it is used and the type of API Gateway selected. For the first 300 million requests, HTTP API calls are $1 per million and $0.9 per million after that. Compared to HTTP API calls, REST API calls are more expensive, with a price of $3.50 per million requests for the first 333 million requests. If an organization is heavily invested in the AWS stack, securing the back-end services with a native API gateway to secure all the API calls, front-end services, and back-end services might be cheaper.

Question: Is API Gateway the most cost-effective HTTP solution for a serverless app?

Answer: Amazon API Gateway in HTTP mode of API calls is the most cost-effective for Lambda-powered HTTP endpoints. It has a very inexpensive pay-as-you-go model. Using other cost-effective gateways (like Kong, Tyk, and Gravitee) may present new challenges if you’re deeply embedded in the AWS ecosystem.

Question: What are the types of APIs supported by Amazon API Gateway?

Answer: Amazon API Gateway offers support for RESTful API, REST API, HTTP APIs, and WebSocket APIs.

Question: What standard feature comes along with HTTP APIs from Amazon API Gateway?

Answer: HTTP APIs service of Amazon API Gateway comes with standard features that include OIDC, OAuth2, and CORS support for authentication, authorization, and on-stage automatic deployments.

Question: What is a Usage Plan?

Answer: The usage plan guides you on how to declare a plan for third-party developers restricting access only to specific APIs, define request quota and throttling limits, and share API keys with them. Utilization data can be created per-API key to analyze API usage and billing generation.

Curious if Amazon API Gateway is right for you? Get a report on the best API gateway tailored to your exact use case.
Get My Free API Gateway Evaluation
It takes 5 minutes.