Amazon API Gateway
Cloud service · AWS · Updated

Amazon API Gateway

In short

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, providing a way to facilitate communication between software applications through web services.

Cloud Services Hub →

Free Amazon API Gateway tools

9 key features of Amazon API Gateway

Amazon API Gateway provides a scalable, secure, and cost-effective way to manage APIs with support for multiple protocols, performance at any scale, robust security and compliance features, cost efficiency, and comprehensive monitoring and management options.

01
Protocol Flexibility

Amazon API Gateway supports a variety of protocols including RESTful APIs and WebSocket APIs, enabling developers to create, publish, maintain, monitor, and secure APIs at any scale.

02
Performance at Scale

It provides efficient, low-latency performance at any scale. API Gateway handles all the tasks involved in accepting and processing up to hundreds of thousands of concurrent API calls, including traffic management, authorization and access control, monitoring, and API version management.

03
Security and Compliance

Offers robust security features that enable developers to secure their APIs. These include options to authenticate and authorize access through identity providers and support for AWS IAM roles and policies. It also complies with ISO, PCI, SOC, and other certifications.

04
Cost Efficiency

With Amazon API Gateway, there is no minimum fee or upfront commitment. HTTP APIs and REST APIs have API-call charges, while WebSocket APIs are billed for messages sent and received and connection time. This makes it a cost-effective solution for businesses of all sizes.

05
Monitoring and Management

API Gateway integrates with Amazon CloudWatch allowing developers to gain insights into API performance and usage metrics. This enables proactive monitoring and management of APIs to ensure optimal performance and availability.

06
Canary Release Deployments

Supports canary release deployments for safely rolling out API changes.

07
Lambda Authorizers

Supports Lambda authorizer functions as an authentication mechanism.

08
Request and Response Validation and Transformation

Supports request/response validation and transformation.

09
CloudTrail Logging

Supports CloudTrail logging and monitoring of API usage and API changes.

Where Amazon API Gateway is used

Amazon API Gateway serves a versatile role in enabling serverless backend, RESTful API development, real-time bidirectional communication via WebSockets, monetization of APIs through AWS Marketplace, and acting as a unified aggregation layer for microservices.

  1. 01
    Serverless Application Backend

    Amazon API Gateway is commonly used to build secure and scalable backends for serverless applications. By integrating with AWS Lambda, it allows developers to execute code in response to HTTP requests without managing servers. This setup is ideal for applications with variable workloads, ensuring high availability, performance, and automatic scaling.

  2. 02
    RESTful API Development

    Developers utilize Amazon API Gateway to create, publish, maintain, monitor, and secure RESTful APIs at any scale. This enables applications to access data, business logic, or functionality from backend services. The gateway provides tools for version management, authorization and access control, throttling, monitoring, and API versioning, facilitating a smooth development lifecycle and API management.

  3. 03
    Real-Time Two-Way Communication

    With the WebSocket protocol support, Amazon API Gateway enables real-time two-way communication between clients and servers. This feature is pivotal for building interactive applications, such as chat applications, real-time notifications, and collaborative platforms, where an instant and continuous data exchange is crucial.

  4. 04
    API Monetization

    Amazon API Gateway supports the use case of API monetization, enabling organizations to create, deploy, and manage APIs as products. By integrating with AWS Marketplace, enterprises can allow developers to subscribe to their APIs, generate revenue based on API usage, and thus turn their APIs into profitable assets.

  5. 05
    Aggregation Layer for Microservices

    API Gateway acts as an aggregation layer for microservices, simplifying the architecture by providing a single entry point for multiple backend services. This helps in managing microservices more effectively, facilitating better monitoring, security, and reliability across all services, while also improving the client experience by reducing the number of round trips required.

How Amazon API Gateway is priced

Amazon API Gateway pricing includes pay-as-you-go for API calls, optional monthly caching fees, and standard AWS data transfer fees.

Pay-As-You-Go

HTTP APIs and REST APIs are billed by API calls. WebSocket APIs are billed by messages sent and received and the number of minutes a client is connected.

Hourly Caching Fees

Optional dedicated caching is charged hourly for each API stage, with rates based on the selected cache size and no long-term commitments.

Data Transfer Fees

HTTP APIs and REST APIs incur charges for data transferred out, except that Private APIs have no data transfer out charges.

AWS PrivateLink Charges

AWS PrivateLink charges apply when using Private APIs in API Gateway.

API Gateway Portals

Each Portal's monthly charge includes 10 PortalProducts with 40 ProductRestEndpoints each. Additional PortalProducts are billed separately, and monthly Portal and PortalProduct charges are prorated based on usage within the month.

AWS Free Tier Credits

Starting July 15, 2025, new AWS customers receive up to $200 in AWS Free Tier credits applicable to eligible services, including API Gateway. Customers can choose a free plan available for six months or a paid plan; credits expire within 12 months of account creation.

Services Amazon API Gateway works with

AWS LambdaAWS Lambda

Amazon API Gateway integrates with AWS Lambda to allow API endpoints to invoke Lambda functions, enabling serverless computing and automatic handling of backend processing.

Amazon CloudWatchAmazon CloudWatch

Provides monitoring and logging capabilities for APIs managed by Amazon API Gateway, allowing the capture of metrics, logs, and alarms for API performance and health.

Amazon CognitoAmazon Cognito

Facilitates user authentication and authorization through integration with Amazon Cognito User Pools and Identity Pools, enabling secure access to APIs.

AWS WAFAWS WAF

Integrates with AWS WAF (Web Application Firewall) to protect APIs from common web exploits and threats including DDoS attacks.

Amazon DynamoDBAmazon DynamoDB

Allows APIs to interact with Amazon DynamoDB for data storage and retrieval, providing seamless integration for backend database services.

AWS Step FunctionsAWS Step Functions

Enables orchestration and coordination of multiple AWS services using step functions, integrating business workflows with API Gateway endpoints.

Amazon S3Amazon S3

Facilitates storage interaction by enabling APIs to retrieve data from and store data into Amazon S3 buckets.

Amazon AthenaAmazon Athena

API Gateway REST APIs can invoke Athena API actions through AWS service integrations. An endpoint can start a query or retrieve its execution status without a Lambda intermediary.

Amazon AuroraAmazon Aurora

API Gateway can invoke the RDS Data API through an AWS service integration to execute SQL against supported Aurora clusters. Request mappings can translate API parameters into SQL parameters.

Amazon Aurora ServerlessAmazon Aurora Serverless

API Gateway can expose database operations through the RDS Data API for Aurora Serverless configurations that support it. This allows an API method to execute a parameterized statement without managing a database connection.

What is Amazon API Gateway

3 min read

Amazon API Gateway is a fully managed service that makes it easier for developers to create, publish, maintain, monitor, and secure APIs at any scale. APIs act as the "doorway" for applications to access data, business logic, or functionality from backend services. In today's digital world, where software applications are increasingly interconnected, API Gateway plays a crucial role in application development and operations. By offering high scalability, a range of API types, and extensive security features, Amazon API Gateway helps developers to efficiently connect their applications to services and data, and ultimately, to end users. 

One of the key benefits of using Amazon API Gateway is its ability to handle thousands of concurrent API calls, effectively managing traffic to ensure smooth and reliable access to backend services. This is particularly beneficial for businesses experiencing varying levels of usage, as the service automatically scales in response to the amount of incoming traffic. Whether traffic patterns are predictable or subject to sudden spikes, Amazon API Gateway can dynamically adjust, helping to ensure that the applications remain responsive and available. 

Account-level throttling limits apply across all APIs in an account within a Region, and the account-level rate limit can be increased upon request.

Amazon API Gateway supports a variety of API types including RESTful APIs and WebSocket APIs. REST APIs are widely used for web services that need to interact over HTTP, while WebSocket APIs are ideal for real-time, full-duplex communication channels over a single, long-lived connection. This versatility allows developers to build a wide array of applications, from simple web applications to complex, real-time communication systems. 

WebSocket API connections have a maximum duration of 7,200 seconds, which cannot be increased.

For RESTful APIs, API Gateway offers both HTTP APIs and REST APIs. HTTP APIs are optimized for proxying requests to Lambda functions or HTTP backends and are a cheaper and faster alternative; REST APIs additionally provide API management functionality.

API Gateway Portals is a fully managed capability for creating developer portals where REST APIs can be centrally discovered, documented, and governed across your AWS infrastructure.

HTTP APIs have a maximum integration timeout of 30 seconds, which cannot be increased.

API Gateway also offers Private APIs, accessed through Amazon VPC endpoints rather than public endpoints.

API Gateway also supports Regional and edge-optimized API endpoints.

Furthermore, security is a paramount concern for any API, and Amazon API Gateway provides several mechanisms to protect access to your APIs. It integrates with AWS Identity and Access Management (IAM) and Amazon Cognito, allowing for fine-grained access control. It also supports OAuth 2.0, providing a framework for authorizing secure access. Additionally, Amazon API Gateway offers capabilities to throttle traffic and protect your backend systems from traffic spikes, as well as encryption tools to help safeguard your data. Amazon API Gateway also simplifies the process of monitoring and maintaining APIs. 

With integration to Amazon CloudWatch, developers gain access to real-time dashboards, log access and execution, and detailed metrics, helping them to understand and react to API activity and health. This comprehensive insight into API usage and performance is essential for optimizing application delivery and user experience. 

In conclusion, Amazon API Gateway stands out as a powerful tool for developers looking to build and deploy APIs. Its managed service approach reduces the complexity associated with directly managing APIs, allowing developers to focus on building functionality rather than being bogged down by infrastructure concerns. From scalability and support for multiple API types to strong security and detailed monitoring capabilities, Amazon API Gateway offers a comprehensive solution for modern API management. This makes it an indispensable tool in the arsenal of developers aiming to build innovative, connected, and secure applications.

Concepts related to Amazon API Gateway

AWS architecture icons are the property of Amazon Web Services. BlowStack is not affiliated with or endorsed by AWS.